Codeigniter | OVH | htaccess/URL重写|网站很慢 [英] Codeigniter | OVH | htaccess / url rewriting | Site very slow

查看:73
本文介绍了Codeigniter | OVH | htaccess/URL重写|网站很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我用htign删除index.php的htaccess:

Here is my htaccess for removing the index.php with codeigniter :

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

但是,使用此.htaccess,会出现错误找不到文件". 因此,我正在搜索,这是一个小解决方案: http://forum.ovh.com/showthread.php?93572-Codeigniter-et-htaccess

But with this .htaccess, there is an error "File not found." So, I'm searching, and here is a little solution : http://forum.ovh.com/showthread.php?93572-Codeigniter-et-htaccess

添加?"解决了问题,但是站点有时非常慢,有时非常快!有时,我的样式表无法加载(assets/css/)...

Adding a "?" resolve the problem, but the site is sometimes very very slow, and sometimes very fast ! And sometimes, my style sheets don't load (assets/css/)...

出什么问题了?我认为这是htaccess,但我不确定.

What is the problem ? I think it's the htaccess but I'm not sure.

规格: 主持人:OVH PHP版本:5.2 CI版本:2.1.4

spec.: Host : OVH php ver. : 5.2 CI ver. : 2.1.4

推荐答案

OVH论坛:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

这篇关于Codeigniter | OVH | htaccess/URL重写|网站很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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