Forum Moderators: phranque
******************************
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@test.egoblogs.net 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.
******************************
How can i fix that?
First place to check is httpd.conf and look for a line similar to this:
LoadModule rewrite_module modules/mod_rewrite.so
If it is commented out, you will need to uncomment it and restart Apache/httpd
And instead of arbitrarily enabling mod_rewrite via htaccess if that is what you are doing, it is best to at least use a module check if/then construct to avoid the 500 error ie:
<IfModule mod_rewrite.c>
RewriteEngine on
...your rewrite stuff here...
</IfModule>
That way if you try a rewrite rule and the resultant URL, if mod_rewrite isn't enabled, you'll just get a 404 "Not Found" instead of a 500 error.
# search
RewriteRule ^s/([^/]+)/?$ /search.php?s=$1 [L]
# links
RewriteRule ^(.*)$ /index.php [L]
This is the error printed in the log:
[error] File does not exist: /home2/mysite/public_html/test/404.shtml
Any ideas on how to fix the htaccess? What i need to accomplish is this:
any URIs that start with /s/ redirect to the search results page, any OTHER URI redirects to the index.php.
www.mysite.com/s/hello/ ---> search.php?s=hello
www.mysite.com/about_us/ ---> index.php