ISAPI ZEND网址重写,添加了额外的"/index.php/"进入网址 [英] ISAPI ZEND url rewrite adding extra "/index.php/" into url

查看:103
本文介绍了ISAPI ZEND网址重写,添加了额外的"/index.php/"进入网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近在服务器上重新安装了我们的网站,sys管理员说这是一次完全的重建,在我看来确实如此,但是有一些不同之处.我最初不是开发该网站的,而那些网站则不再可用.

We recently reinstalled our web site on our server, the sys admin says it is an exact rebuild, and it indeed looks to me that it is, but there is something different going on. I did not originally develop the site, and those who did are no longer available.

urls

//admin.site.com/index.php/schedules

//admin.site.com/index.php/schedules

并且曾经是,应该是

//admin.site.com/schedules

//admin.site.com/schedules

多余的index.php被插入到URL中.但是,管理站点中的所有链接都不包含index.php,因此它们不起作用.如果将index.php插入任何URL,它将起作用.这个index.php来自哪里,以及如何从重写规则中删除它,以便链接正常工作.

The extra index.php is getting inserted in the url. But all links within the admin site do not include the index.php so they do not work. If you insert the index.php into any url, it works. Where did this index.php come from and how do I eliminate it from the rewrite rules so the links will work.

这是我的httpd.conf文件读取的内容:

This is what my httpd.conf file reads:

# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.56

# turn on rewriting RewriteEngine On RewriteBase /

# for all files not found in the file system,
# reroute to "index.php" bootstrap script,
# keeping the query string intact. 
RewriteCond %{HTTP_HOST} ^admin.site.com$ 
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule ^.*$ - [NC,L] 
RewriteCond %{HTTP_HOST} ^admin.site.com$ 
RewriteRule ^.*$ index.php [NC,L]

谢谢!任何帮助将不胜感激.

Thank you! Any help would be greatly appreciated.

推荐答案

您需要实现并启用ApacheModrewrite.然后在您的admin.site.com文件夹中放入一个.htaccess文件 其内容为:

You need to implement and enable ApacheModrewrite. And then put a .htaccess file in your admin.site.com folder Its content will be :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR] 
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d


RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

这篇关于ISAPI ZEND网址重写,添加了额外的"/index.php/"进入网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆