Forum Moderators: phranque
After following the excellent example by jdMorgan
[webmasterworld.com...]
I have a .htaccess file that works:
# Enable mod_rewrite, start rewrite engine
Options +FollowSymLinks
RewriteEngine on
#
# Internally rewrite search engine friendly static URL to dynamic filepath and query
RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/?$ /product.php?p=$1&id=$2&t=$3 [L]
So first of all, thanks JD for the post, I have tried unsuccessfully to do this before.
I tried loading my site in XAMPP with the new .htaccess file in place and it gave an error. With the .htaccess moved it started working again. I can understand that it would cause problems, but are there any ways to use something like XAMPP whilst testing mod_rewrite files?
Thanks
What do you see in your server error log file?
XAMPP is just a "package" of Apache, MySQL, PHP, PERL, and some other stuff, so the question sort of resembles asking, "Can I use Apache while testing .htaccess?" As a result, it's confusing... :(
The problem is likely just a basic server config problem, though.
Jim
The error I get is below. Just to reiterate, the .htaccess file is working fine on my server, I only encounter this error when using XAMPP.
Thanks
....................................................................
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
127.0.0.1
02/27/09 09:29:11
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
.................................................................
I just found this in my XAMPP error log file too:
...............................................................
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration