Forum Moderators: phranque
Here is my .htaccess file:
# .htaccess for root
# godaddy stuff to make php5 default
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
# turn on mod_rewrite
Options +FollowSymlinks
RewriteEngine on
# set the base to the root
RewriteBase /
# redirect .htm or .html requests into .php
RewriteRule ^(.+)\.htm(.?)$ /$1.php [R=301,NC, L]
# filter page requests through the index
RewriteRule ^/([A-Za-z]*)$ /index.php?page=$1 [R=301, NC, L]
if you have a 500 error you also have an entry in the error log with some useful information...
# redirect .htm or .html requests into .php
RewriteRule ^(.+)\.htm(.?)$ /$1.php [R=301,NC, L]
# filter page requests through the index
RewriteRule ^([A-Za-z]*)$ /index.php?page=$1 [NC, L]
Many shared hosting plans make the error log available, and it is well-worth digging for it -- or even demanding it. :) Some problems are pretty much impossible to fix without it.
Jim