Forum Moderators: phranque
[mysite.com...]
to [mysite.com...]
The .htacces file worked fine on my old server on Ensim, but on DirectAdmiin has some issues... It doesn't seem like the rewrite rule geets executed, and I just get a 404 error.
here is the .htaccess file.
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^shop/product/(.*)/(.*).html product.php?ID=$1
(I'm still testing it on my new server that has not propagated...
[111.111.111.11...]
Does that have anything to do with it?. I didn't think so, but...)
Try a simple rewrite to eliminate all unnecessary variables. Something like:
RewriteRule ^foo.html$ /some_static_page.html [L]
Reviewing the Apache docs for the AllowOverride, Options, and LoadModule directives may be useful.
Jim
My script includes;
RewriteRule ^shop/category/(.*)/(.*)/(.*)/(.*) shop.php?query=$1&query2=$2&query3=$3&query4=$4
But somehow I'm still hitting the 404 error, instead of getting to the page /shop.php?query=$1&query2=$2&query3=$3&query4=$4
THANKs for any help!
You might try a hard ending ($) on the left side of the rule, and a preceding / on the right side of the rule as required in the .htaccess file:
RewriteRule ^shop/category/(.*)/(.*)/(.*)/(.*)$ /shop.php?query=$1&query2=$2&query3=$3&query4=$4 [L]
Justin
[edited by: jd01 at 4:07 am (utc) on July 6, 2005]
Seems like the problem is that I have used your other suggestion from another post... I put an .htaccess file in the directory
www.mysite.com/shop/
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(index\.html)?$ /shop.php [R=301,L]
I Want to have the following behaviors (in addition to having the above mod_rewrites):
People who go to [mysite.com...] or [mysite.com...] to to automatically to
www.mysite.com/shop.php
IF I remove the .htaccess file from the directory /shop/ then the rewriterules for the other rules work! Now what? Seems like I can get one thing working, OR the other, but not both!