[opensuse] apache Server Error 500 for .htaccess on localhost
Hello,
I am doing something wrong with my apache settings to make work
.htaccess in a directory... I hope you can help me :-)
I need to have all calls to .html-pages in some subdirectories
redirected to my index.php putting the path in a parameter called "wo".
My htaccess looks like this:
------------
RewriteEngine on
rewriteRule ^(en/)(.*)(\.html?)$ index\.php?%{QUERY_STRING}&wo=$1$2 [L]
RewriteRule ^(de/)(.*)(\.html?)$ index\.php?%{QUERY_STRING}&wo=$1$2 [L]
RewriteRule ^(es/)(.*)(\.html?)$ index\.php?%{QUERY_STRING}&wo=$1$2 [L]
RewriteRule ^(cc/)(.*)(\.html?)$ index\.php?%{QUERY_STRING}&wo=$1$2 [L]
RewriteRule ^(index*)(.*)(\.*?)$ index\.php
-------------
(This works on my online server in a hosting company)
To make .htaccess work I added a file "vhost_db2020.conf" to
/etc/apache2/vhosts.d/ with the following content:
-------------
Daniel Bauer wrote:
In the apache-log I only find the following:
What about the error log? -- Per Jessen, Zürich (20.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
Daniel Bauer wrote:
In the apache-log I only find the following:
What about the error log?
Actually, try enabling rewriting in your vhosts definition - IIRC, it
has to be enabled there.
Am 25.05.20 um 13:16 schrieb Per Jessen:
Per Jessen wrote:
Daniel Bauer wrote:
In the apache-log I only find the following:
What about the error log?
Haha stupid me, thought the apache log was it
Actually, try enabling rewriting in your vhosts definition - IIRC, it has to be enabled there.
RewriteEngine on
Options Indexes FollowSymLinks MultiViews AllowOverride All </Directory> </VirtualHost>
Looks like that did the trick. It's working now, thanks Per! -- Daniel Bauer photographer Basel Málaga https://www.patreon.com/danielbauer https://www.daniel-bauer.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Daniel Bauer
-
Per Jessen