Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'General Discussion' started by itcf, Jul 15, 2013.

  1. itcf

    itcf Registered

    Joined:
    Jul 14, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    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
     
    #1 itcf, Jul 15, 2013
    Last edited: Jul 15, 2013
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,183
    Likes Received:
    1,935
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

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

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice