I'm not experienced in editing .htaccess
I wanted to
redirect non-www to www.
remove .php extension
- set up a custom 404 page
I managed to do this (looking for solution in the web and on serverfault.com), but now it seems that my old redirect 301 with .php extension are not working anymore:
redirect 301 /download.php /features.php
how I could solve it? Thank you!
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteCond %{THE_REQUEST} ^GET\s.+\.php [NC]
RewriteRule ^(.+)\.php$ /$1 [NE,R=301,L,NC]
RewriteCond %{REQUEST_URI} !\.php$ [NC]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule . %{REQUEST_URI}.php [L]
Options +FollowSymlinks
ErrorDocument 404 /404
RewriteEngine on