How to perform URL redirection using mod_rewrite in 2.0 beta
-
I have raised these questions in another thread Permalinks and Edit posts WP 2.0 beta. I think someone may overlook it, so I start a new thread to ask it agin.
In version 1.5.2, I use mod_rewrite to redirect all my post feed and comment feed to Feedburner, and use the mod_rewrite of Ultimate Tag Warrior (UTW) plugin to use a simpler URL /tag/tag instead of /index.php?tag=tag.
I have tried to use .htaccess file of version 1.5.2 in version 2.0 Beta 1 without any problem. I found that whatever permalink structure I used, the content of .htaccess file still contained the following few lines.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>I love the simplicity of the content of .htaccess file in 2.0. I tried to use it but I have some problems if someone can lead me a hand to solve it.
- How to disable the mod_rewrite of post feed and comment feed so that I can add the entries of redirection of feed to Feedburner?
- I have added the following entries in .htaccess that generated by UTW of /tag/tag URL redirection to the .htaccess of version 2.0 Beta 1. However, the redirection failed. How can I solve it?
RewriteRule ^tag/?(.*)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?tag=$1&feed=$2 [QSA,L]
RewriteRule ^tag/?(.*)/page/?(.*)/$ /index.php?tag=$1&paged=$2 [QSA,L]
RewriteRule ^tag/?(.*)/$ /index.php?tag=$1 [QSA,L]
RewriteRule ^tag/?(.*)/page/?(.*)$ /index.php?tag=$1&paged=$2 [QSA,L]
RewriteRule ^tag/?(.*)$ /index.php?tag=$1 [QSA,L]
- The topic ‘How to perform URL redirection using mod_rewrite in 2.0 beta’ is closed to new replies.