I have old URL path for all pages
example.com/w/Page_title
Now I changed it to
example.com/Page_title
using Short URL manual for Apache
And the question is: How to make 301 redirects from old path for users that coming back using bookmarks?
my LocalSettings.php
$wgForceHTTPS = true;
$wgScriptPath = "/wiki";
$wgArticlePath = "/$1";
and mod_rewrite:
RewriteEngine On
# Short URL for wiki pages
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
# Redirect Main Page to /
RewriteRule ^/*$ /index.php?title=Main_Page [L,QSA]
RewriteRule .*\.ico$ - [L]