This is my code in the .htaccess:
Options -Multiviews
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^home$ home.php [L]
With this code the url http://www.example.com/home does work but it doesn’t redirect from http://www.example.com/home.php to http://www.example.com/home
With this code instead:
Options -Multiviews
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^home$ home.php [R=301,L]
I get this error:
Not Found
The requested URL /var/chroot/home/content/08/236108/html/home.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
How can I redirect from home.php to home and avoid errors ?
1 Answer