哪位老大能帮着写一个apache rewrite的正则 我想把www.abc.com/index.php/ 301重定向至www.abc.com/请问在.htaccess中如何写查了半天,只把www.abc.com/index.php改成www.abc.com了而www.abc.com/index.php/改不了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是我的代码,请问如何实现 www.abc.com/index.php/ 301重定向至www.abc.com/上RewriteCond %{THE_REQUEST} ^.*/index.php RewriteRule ^(.*)index.php$ http://www.abc.com/$1 [R=301,L] RewriteCond %{http_host} ^abc.com [NC] RewriteRule ^(.*)$ http://www.abc.com/$1 [R=301,NC] RewriteRule / index\.php [L] 试试这个?在我这里可以RewriteRule index\.php/? / [R=301] 完整的话这样应该可以了:RewriteCond %{HTTP_HOST} =www.abc.com [NC]RewriteRule index\.php/? / [R=301]不过不知道楼主这个匹配的目的是什么,index.php前面还有东西么?(.*)index.php closure老大,不瞒您说,我是在网上找了一个抄的,不懂啥意思,惭愧惭愧!我现在要实现www.abc.com/index.php 301 www.abc.com/www.abc.com/index.php 301 www.abc.com/abc.com/index.php 301 www.abc.com/abc.com 301 www.abc.com/以及所有index.php/的都要定向到www.abc.com,不知道这个完整的该怎么写向您学习了谢了 修改一下index.php/的都要定向到www.abc.com/ RewriteCond %{HTTP_HOST} =www.abc.com [NC]RewriteRule index\.php/? / [L,R=301]RewriteCond %{HTTP_HOST} =abc.com [NC]RewriteRule .* http://www.abc.com/$0 [L,R=301] php 图片上传问题,请高手指教 php好不好学?怎样才能学好它? 请问 为什么 delphi for php 做的网站 部署到 appserv-win32-2.4.9 访问时,提示有错?是不是 不支持php4? 用swift发送HTML邮件的问题 用PHP排序mysql问题 为什么接收不到参数? Apache 404自定义错误 关于在本机上写cookie的问题。急急~~高分相送~ 打开网页自动弹出二个窗口的问题,高手指教,急,在线等! php ed3.0 为什么不好使 请问一条关于MySQL的查询问题~望高手指导~感激不尽 关于用php抓取阿里巴巴的企业信息
www.abc.com/index.php/ 301重定向至www.abc.com/上RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.abc.com/$1 [R=301,L] RewriteCond %{http_host} ^abc.com [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [R=301,NC]
RewriteRule / index\.php [L]
RewriteRule index\.php/? / [R=301]
不过不知道楼主这个匹配的目的是什么,index.php前面还有东西么?
(.*)index.php
我现在要实现
www.abc.com/index.php 301 www.abc.com/
www.abc.com/index.php 301 www.abc.com/
abc.com/index.php 301 www.abc.com/
abc.com 301 www.abc.com/
以及所有
index.php/的都要定向到www.abc.com,
不知道这个完整的该怎么写
向您学习了
谢了
index.php/的都要定向到www.abc.com/
RewriteCond %{HTTP_HOST} =www.abc.com [NC]
RewriteRule index\.php/? / [L,R=301]RewriteCond %{HTTP_HOST} =abc.com [NC]
RewriteRule .* http://www.abc.com/$0 [L,R=301]