why isn't this URL rewrite working?
This is the "real" link:
domain.com/show_shop.php?id=4
This is the rewritten:
domain.com/show_shop/4开发者_如何学Go
I use the later because I have this in my .htaccess:
RewriteRule ^show_shop/([0-9_]+)$ show_shop.php?id=$1 [NC]
But it doesn't work for some reason. Will not this rewriterule give what I want?
Thanks
EDIT:
RewriteRule ^new_ad$ new_ad.php [NC] // WORKS FINE!
RewriteRule ^kategori/([0-9_]+)/([0-9]+)$ browse_cat.php?cat_gr=$1&p=$2 // WORKS FINE!
If show_shop is called but the URL parameter is not set, it could be due to MultiViews. Try to disable it.
Try:
RewriteRule ^/show_shop/([0-9_]+)$ /show_shop.php?id=$1 [NC]
Also, if possible, you can see the log of what's happening if you turn these on in your VirtualHost:
#warning, slows server perf
RewriteLog "/var/log/apache/rewrite.log"
RewriteLogLevel 9
精彩评论