我正在开发一个php框架工作,我是.htaccess规则的新手。所以我需要使用.htaccess重定向 网址。链接从url中删除index.php htaccess
http://localhost/rinocabs/index.php?/Galary/Image/
应在.htaccess文件转换为这个
http://localhost/rinocabs/Galary/Image/
我包括这些规则
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^localhost/rinocabs/index.php?/Galary/Image/ [nc]
rewriterule ^(.*)$ http://localhost/rinocabs/Galary/Image/$1 [r=301,nc]
,但它不工作。请帮忙。
有用。很好,但是对我的问题没有帮助。谢谢 –
你用'RewriteCond%{THE_REQUEST}^[AZ] {3,} \ s( 。*)/ index \ .php?[NC]' – sas
我对你的代码很感兴趣,我对htaccess代码有新意,请你一行一行解释一下这个代码:) 我得到了这样的结果 localhost/rinocabs/index.php?/ Galary/Image /结果为 localhost/rinocabs/ –