Mobile app version of vmapp.org
Login or Join
Holmes151

: .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

@Holmes151

Posted in: #Htaccess #ModRewrite

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Holmes151

1 Comments

Sorted by latest first Latest Oldest Best

 

@Holmes151

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme