ISAPI ZEND网址重写,添加了额外的"/index.php/"进入网址

编程入门 行业动态 更新时间:2024-10-24 04:49:33
本文介绍了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/index.php/schedules

//admin.site/index.php/schedules

并且曾经是,应该是

//admin.site/schedules

//admin.site/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$ RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^admin.site$ RewriteRule ^.*$ index.php [NC,L]

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

Thank you! Any help would be greatly appreciated.

推荐答案

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

You need to implement and enable ApacheModrewrite. And then put a .htaccess file in your admin.site 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/"进入网址

本文发布于:2023-11-01 23:17:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550695.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网址   重写   ZEND   ISAPI   index

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!