删除codeigniter的index.php文件

编程入门 行业动态 更新时间:2024-10-22 05:09:41
本文介绍了删除codeigniter的index.php文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是的,这一个又一个。我用尽了一切我能找到的,没有运气搜索。

在我的httpd.conf(运行CentOS的和apache2的):

<虚拟主机*:80>服务器名www.domainServerAlias​​ domain * .domainDocumentRoot的/var/www/html/domain< /虚拟主机>

在我/var/www/html/domain htaccess的:

RewriteEngine叙述上的RewriteCond $ 1 ^(指数\\ .PHP |图片|机器人\\ .txt)的!重写规则^(。*)$的index.php / $ 1 [L]

一切似乎是工作。

我已经尝试添加

的RewriteBase /

我试过的最后一行切换到:

重写规则^(。*)$ /index.php/$1 [L]

解决方案

您需要确保在您的虚拟主机,你有:

<目录/path...to目录>        为了允许,拒绝        所有允许        所有的AllowOverride    < /目录>    < IfModule mod_rewrite.c>        RewriteEngine叙述上    < / IfModule>

Yes, another one of these. I've tried everything I could find on the search with no luck.

In my httpd.conf (running centos and apache2):

<VirtualHost *:80> ServerName www.domain ServerAlias domain *.domain DocumentRoot /var/www/html/domain </VirtualHost>

in my htaccess in /var/www/html/domain:

RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ index.php/$1 [L]

Nothing seems to be working.

I've tried adding

RewriteBase /

I've tried switching the last line to:

RewriteRule ^(.*)$ /index.php/$1 [L]

解决方案

You need to make sure that in your virtual host you have:

<Directory "/path...to directory"> Order allow,deny Allow from all Allowoverride all </Directory> <IfModule mod_rewrite.c> RewriteEngine on </IfModule>

更多推荐

删除codeigniter的index.php文件

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

发布评论

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

>www.elefans.com

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