开发者

Using .htaccess to rewrite the url in a sub directory

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜