我想要得到这个
重定向到:
http://my.url.com/app/index.cfm?event=user.login
我正在使用此重写规则但它无效。
RewriteCond %{REQUEST_URI} ^/login/$
RewriteRule ^/app/index.cfm?event=user.login [NC,L]
我做错了什么?
由于
答案 0 :(得分:0)
RewriteRule
的第一个参数是与URI匹配的模式,并且您缺少该模式。尝试:
RewriteRule ^/?login/$ /app/index.cfm?event=user.login [NC,L]
如果要从外部重定向浏览器,请在方括号中包含R
或R=301
(永久)标记,例如[NC,L,R=301]
。