htaccess上传到apache服务器后无法正常工作

时间:2019-03-14 12:34:29

标签: apache .htaccess

我完成了一个网站,并在我的电脑上使用xampp正常运行,但是从将项目从1und1.de上传到网站空间的那一刻起,.htaccess文件不再起作用,并且出现500 Internal Server Error 。我并没有完全进入.htaccess文件,但是我需要一个文件,该文件将每个请求(甚至在子目录中)都重定向到基本index.php文件。

这是代码:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(content|core|help|robots\.txt)

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

0 个答案:

没有答案