Let me give the full scope hopefully I don't lose anyone.
We had a 5 year old webserver. So they told us we can upgrade to a much better server. So we migrated all the accounts to the new server(luckily we didn't switch the DNS's to the new account) we also switched from PHP4 to PHP5
So we took a couple of sites that rely on the htaccess and the database to pull dynamic pages.
In the Htaccess file have the line: RewriteRule ^([^/]*)\.htm$ /?p=$1 [L]
but when we access the website after the dns propogated:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@babyloncomputerrepair[dot]com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I tried specifying index.htm. I just added this. Here is a copy of my HTACCESS FILE.
# -MY HTACCESS FILE-
IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti* #DirectoryIndex index.htm <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> #AuthName www.babyloncomputerrepair[dot]com #AuthUserFile /home/balonc/public_html/_vti_pvt/service.pwd #AuthGroupFile /home/balonc/public_html/_vti_pvt/service.grp
SetEnvIf Request_URI "^(/403./robots\.txt*\.jpg*\.gif*\.jpeg)$" allowsome <Files *> order deny,allow deny from env=getout allow from env=allowsome </Files>
# ensure CHMOD settings for specified file types # remember to never set CHMOD 777 unless you know what you are doing # files requiring write access should use CHMOD 766 rather than 777 # keep specific file types private by setting their CHMOD to 400 # chmod .htaccess files 640 # chmod .htpasswd files 640
The * makes this code ambiguous: RewriteRule ^([^/]*)/([^/]*)\.htm$ /?p=$1&s=$2 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.htm$ /?p=$1&s=$2&ss=$3 [L]
You will need this: RewriteRule ^([^/.]+)\.htm$ /index.htm?p=$1 [L] RewriteRule ^([^/]+)/([^/.]+)\.htm$ /index.php?p=$1&s=$2 [L] RewriteRule ^([^/]+)/([^/]+)/([^/.]+)\.htm$ /index.php?p=$1&s=$2&ss=$3 [L] All of the changes are there for a reason.
Due to differences in the server config file, you may need to add Options +FollowSymLinks -MultiViews
to get your code working again.
You have two errors due to non-existent error documents. Fix these now to simplify your debugging. Either create the error document files as static html pages with no includes (no image, css, or script includes), or change the ErrorDocument directives to output short, fixed text strings. See the ErrorDocument directive documentation for details -- and heed well the warning about the effects of using a URL instead of a filepath for an ErrorDocument... Using a URL for an ErrorDocument is SEO-fatal.