htaccess file is created in order to enable extra features for that subdirectory. You can use the . htaccess file to modify various configurations and thus make changes to your website. These changes include authorization, error handling, redirects for specific URLs, user permissions, etc.
Greetings!
I'm trying to replace .php extensions with .html
So far I got:
RewriteRule ^(.*)\.html $1.php
... it works nicely when url like /site/page.html
is entered (and page.html
does not physically exist but page.php
does).
However what I'd like to have is when /site/page.php
is entered the viewer sees only /site/page.html
in the browser location.
Is that doable or do I have to set up explicit redirects for each page? :-(
Thanks in advance.
ps: dev environment I'm using is XAMPP on os x if it makes any difference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With