您好我想重定向的URL:笨的.htaccess国防部重写不工作
http://localhost/invite/yK-as8_/Subhrojit_Nag
到
http://localhost/auth/accept_invitation/yK-as8_/Subhrojit_Nag
我用下面的重写,但他们都不工作。 htaccess文件位于文档根路径中。请帮忙。 “
1>
RewriteCond %{REQUEST_URI} ^/invite
RewriteRule ^/invite/([\w\-]*)/([\w\-]*)$ /index.php/auth/accept_invitation/$1/$2
1.1>(因为我已经使用此废除的index.php)
RewriteCond %{REQUEST_URI} ^/invite
RewriteRule ^/invite/([\w\-]*)/([\w\-]*)$ /auth/accept_invitation/$1/$2
2>
RewriteCond %{REQUEST_URI} ^([\w\-.\/:]*)\/invite\/([\w\-]*)\/([\w\-]*)$
RewriteRule ^([\w\-.\/:]*)\/invite\/([\w\-]*)\/([\w\-]*)$ $1/index.php/auth/accept_invitation/$2/$3
”
你能告诉我是什么[R]代表什么吗? – SNAG 2012-02-23 10:23:46
@SNAG它意味着重定向用户。 http://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_r – 2012-02-24 03:32:21