Wordpress permalinks hijacking my custom urls to landing pages
I have a bunch of /promo
like urls that go outside the realm of wordpress to a custom php page. But with the default rewrite rules in wordpress, it redirects all requests to its own 404 page.
I would like to be able to redirect /promo
to http://domain.com/subdir/index.php?flag1=foo&flag2=bar
. The default wordpress .htaccess is below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 开发者_如何学Python%{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
How do I go about doing this?
You can edit .htaccess yourself and add your redirection rules before WordPress'. If you're not comfortable with directly editing the .htaccess (always save the existing version first!), you can use a plugin like this one:
http://wordpress.org/extend/plugins/wp-htaccess-control/
It lets you add your own redirection rules into the .htaccess ahead of WordPress' rules.
精彩评论