How to redirect a old uri without redirecting :)
-
Hello! I’m a newb at this mod-rewrite thing and I’ve searched google high and low and can’t quite find the information I need, so I was hoping some kind soul here could point me in the right direction.
My wordpress is installed and functions. In my .htaccess I started with:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]so uris like https://www.geeksrus.com/feed/ works, or https://www.geeksrus.com/index.php?feed=rss2 also works.
So far, so good ??
Now I’d like my old URI for my 5 years old blog, https://www.geeksrus.com/index.xml Ok I know the url sucks, but its what i had.
So I added after I dunno 20 hours of frustration and many google searches:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.xml\ HTTP/
rewriterule index\.xml$ https://www.geeksrus.com/feed/ [R=302,L]Now this works, but the effect is a redirect, so if someone subscribes to https://www.geeksrus.com/index.xml, their newsreader or itunes sees https://www.geeksrus.com/feed/
I’d like to keep the wordpress URL hidden and just serve up the proper content on the old, now non-existant URI.
Any tips for a weary person?
Thanks!
Steve
- The topic ‘How to redirect a old uri without redirecting :)’ is closed to new replies.