How does one redirect from one wordpress page to another via htaccess?
Posted
by
jchwebdev
on Pro Webmasters
See other posts from Pro Webmasters
or by jchwebdev
Published on 2014-06-11T17:24:44Z
Indexed on
2014/06/12
3:51 UTC
Read the original article
Hit count: 177
I tried making the following change to my wordpress site to permanently redirect a common link to a new page. I could've -sworn- that this used to work. But it simply does not (at least in WP 3.9). I have had to resort to using a Redirect Plug-In.
I'm wondering -why- it doesn't work and if there is a technique which -will- work. I'd prefer to continue to use .htaccess for simplicity.
Below is the .htaccess file:
# MY CHANGES
Redirect 301 http://mysite.com/gigs http://mysite.com/booking/
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Again, it works by using a redirect plug-in inside WP, but there must be a way to force the 'redirection' to occur -before- the URL is passed to the WP engine, right? How is the done?
© Pro Webmasters or respective owner