We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question

File Extensions

File Extensions - I have a simple site without using perch navigation, just links in a header. Pages are currently using .html, I want to remove this extension

How do I do this please! ?

I currently have a htacess file with this:

<IfModule mod_rewrite.c> RewriteEngine on

Redirect to PHP if it exists.

e.g. example.com/foo will display the contents of example.com/foo.php

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.+)$ $1.php [L,QSA]


Daniel Hurley

Daniel Hurley 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

This is about changing php to html ?

I want no extension....

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Drew has written up all sorts of information about URL rewriting here: https://24ways.org/2013/url-rewriting-for-the-fearful/