我将当前的 .htaccess 文件上传到 1and1 服务器(实际上是 1und1.de,但我猜它是一样的)并且我收到 500 Internal Server Error。
Options -MultiViews
RewriteEngine On
RewriteBase /lammkontor
RewriteRule ^categories/([^/\.]+)/?$ index.php?url=category.php&cat_url=$1 [L]
RewriteRule ^categories/([^/\.]+)/([^/\.]+)/?$ index.php?url=product.php&cat_url=$1&prod_url=$2 [L]
RewriteRule ^categories/([^/\.]+)/([^/\.]+)/recipes?$ index.php?url=recipes.php&cat_url=$1&prod_url=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+\.php)/?$ index.php?url=$1 [QSA]
这个 .htaccess 在我的本地 MAMP 服务器上完美运行。
当我使用示例文件在控制中心测试 CGI-Monitor 时,我得到
- cgi: File not present or has invalid modes
(no output)
现在唯一工作的文件是 index.php
谢谢你的帮助!