Support » Fixing WordPress » Redirect all pages from .php to no extension

  • Hi,

    Not sure if this is a wordpress setting or more of a .htaccess setting but here goes:

    I’ve rebuilt a static site on wordpress and there is a change in the URLs now.
    Before the urls were like this:
    Now in wordpress its like this:

    So the URLs are exactly the same apart from the removed .php extension.

    How can I create an .htaccess code that will redirect any .php link into a non .php extension?
    Since I don’t have any page on the site now which has an extension I think it would make more sense to use a dynamic code rather than make a 301 redirect for each and every page.

    So if someone opens my site with a link like the .htaccess automatically takes him to

    Any help would be appreciated!


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Redirect all pages from .php to no extension’ is closed to new replies.