我正在尝试开发一个codeigniter应用程序,当我在我的xampp上运行时,一切都运行正常但是当我在服务器上运行1和1时,我收到错误500.
我和1and1谈了他们说,问题出在这个htaccess上,我不明白为什么?。
这是文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<Files "index.php">
AcceptPathInfo On
</Files>
php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value max_execution_time 30
php_value max_input_time 30
问题出在哪里?非常感谢
答案 0 :(得分:0)
在1and1中,您无法更改服务器php规范,如:
php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value max_execution_time 30
php_value max_input_time 30
尝试删除此行。
此外,这是我的.htaccess文件在1and1服务器上运行:
#Deny from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^core.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
如果CI安装位于相对于.htaccess的另一个文件夹中,则应将RewriteBase /更改为/ CI-folder