I want to redirect a url pattern like
http://abcd.com/some/sub/directory/var1
to
http://abcd.com/some/sub/directory/?search=var1
I've read other posts like this. But none of them solved my problem. I don't have write access to root directory. So I've placed this .htaccess file in "/some/sub/directory/"
Edit : Here is my curr开发者_运维百科ent htaccess file.
RewriteEngine on
RewriteRule ^product/(.*)$ product/?search=$1
In order for the htaccess file to take effect, the server admin must have the appropriate AllowOverride
setting in their Apache configuration. If your htaccess does nothing, this setting is probably disabled. Otherwise, use mod_rewrite normally.
精彩评论