Reputation: 1097
I uploaded the current .htaccess file to a 1and1 server (actually 1und1.de, but I guess it's the same) and I'm geting a 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]
This .htaccess works perfectly on my local MAMP server.
When I test the CGI-Monitor in the control-center with an example file I get
- cgi: File not present or has invalid modes
(no output)
The only file working now is index.php
Thanks for your help!
Upvotes: 5
Views: 7393
Reputation: 1
Just put a slash before the url. eg /index.php instead of index.php at the end of the rule
Upvotes: 0
Reputation: 1097
Actually I solved my problem adding a slash to the beginning of every Rewrite Rule, like:
RewriteRule ^(.+\.php)/?$ /index.php?url=$1 [QSA]
instead of
RewriteRule ^(.+\.php)/?$ index.php?url=$1 [QSA]
Thanks!
Upvotes: 19
Reputation: 24478
By default apache's htaccess
rights are off or limited depending on your host.
I suspect its your Options -MultiViews
causing the error.
Check your httpd.conf
and check that MultiViews
is allowed like below.
<Directory />
Options FollowSymLinks
AllowOverride Indexes Options=All,MultiViews
Order deny,allow
Deny from all
</Directory>
Upvotes: 1