嗨,我是新手,在这个过程中url重写帮助。
实际上我想重写我的url:
http://abcd.com/merchant.php?store=2&area=323&storename=Vendor-2
至
http://abcd.com/Vendor-2
但它不起作用。当我点击href目标的时候,它正在加载。下面是我的.htaccess文件
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ /%1 [R=301,L]
RewriteRule ^([^/]*)\.html$ /merchant\.php?store=1&area=132&storename=$1 [L]上面的文件是我的.htaccess文件,但它不工作。
有人能给我一个建议吗?
发布于 2013-07-26 22:20:58
# This should match when storename contains [a-zA-Z0-9_-]
RewriteCond %{QUERY_STRING} storename=([\w-]+)
RewriteRule merchant.php /%1 [R=301,L]https://stackoverflow.com/questions/17881458
复制相似问题