我在使用 ubuntu
的云服务器上安装了灯堆栈并添加了我的服务器文件等...
但是当我尝试访问像 1.2.3.4/page 这样的页面时,它将返回 404 页面未找到错误...
我正在使用Codeigniter
框架。
我尝试编辑 site-available/default
文件并将 AllowOverride
从 No
更改为 All
但它会然后显示 500 服务器错误
AllowOverride None
至
AllowOverride All
...有什么线索吗?
我的 htaccess 文件:
RewriteEngine On
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]
最佳答案
如果您收到 500 服务器错误,则问题与访问限制无关。检查网络服务器日志以查找错误跟踪!
500服务器错误意味着您的请求已被处理(因此没有限制问题)但发生了错误。
关于php - ubuntu htaccess 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10224279/