htaccess question - rewrite pdf to html (with one condition)

itcf

Registered
Jul 14, 2013
1
0
1
cPanel Access Level
Website Owner
Hi. I have what seems like a "simple" .htaccess question, but I can't figure it out for the life of me:

How do I change the suffix (301 redirect) of all pages ending in .pdf to .html - except when URL begins with "www.mydomain.com/pdf/"

Thanks!
Daniel
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello :)

You may find more user input for custom rewrite rules directly from the Mod_Rewrite Forums.

Thank you.