: .htaccess redirect with mod_rewrite I moved my wiki from http://jklatex.square7.de/wiki/doku.php/start to http://logicpuzzle.square7.de/start and now i want to redirect the URL with mod_rewrite. My
I moved my wiki from
jklatex.square7.de/wiki/doku.php/start
to
logicpuzzle.square7.de/start
and now i want to redirect the URL with mod_rewrite. My .htaccess is as follows:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^/wiki/doku.php/(.*)$ logicpuzzle.square7.de/ [R,NC,L]
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I don't understand why it does not work :-(
Any hints?
More posts by @Holmes151
1 Comments
Sorted by latest first Latest Oldest Best
The leading slash is evil! ;-) The slash is part of RewriteBase.
Changing the RewriteRule to
RewriteRule ^wiki/doku.php/(.*)$ logicpuzzle.square7.de/ [R=301,NC,L]
works as desired.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.