Question
Mediawiki URL redirect with .htaccess
I use Mediawiki on my site’s subdomain (viki). I changed my url structure.
Old url structure: http://viki.gameofthronestr.com/index.php/Lannister_Hanesi
New url structure: http://viki.gameofthronestr.com/Lannister_Hanesi
I just deleted “/index.php/” from url.
I want to redirect old urls to news on .htaccess. (I use Apache) How i redirect old URL to new?
I tried that but doesnt work:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^viki/(.*)$ /index.php?title=$1 [PT,L,QSA]
RewriteRule ^viki/*$ /index.php [L,QSA]
RewriteRule ^viki$ /index.php [L,QSA]
RewriteRule ^index.php/(.*)$ /$1 [R=301,L]
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×