[英]htaccess simple rewrite doesn't work
Can anyone see why this doesn't redirect? 谁能看到为什么它不重定向?
RewriteEngine On
RewriteRule ^case-studies(/)?$ index.php/portfolio/ [NC,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Fyi, although it shouldn't matter, I'm using Zend framework, just need to mask the '/portfolio' to '/case-studies' (picky client!) Fyi,尽管没关系,但我使用的是Zend框架,只需要将'/ portfolio'屏蔽为'/ case-studies'(挑剔的客户端!)
Thanks 谢谢
如果要将/portfolio
更改为/case-studies
,则需要颠倒顺序:
RewriteRule ^portfolio(/)?$ index.php/case-studies/ [NC,L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.