views:

55

answers:

2

Hello Guys,

How can I redirect http://domain.com/blog/index.php/weblog/rss_2.0/ to http://www.domain.com/feed/ with .htaccess?

The website has 3 domains pointing to it and all is using the same htaccess.

Thanks!

+2  A: 
redirect 301 blog/index.php/weblog/rss_2.0/ http://www.domain.com/feed/

It's that easy! Just make sure that the .htaccess file is located at the web root, which is usually `http://www.domain.com'.

EDIT: For redirecting other pages, just follow the basic format

redirect 301 [path from web root] [full path to the new page]

You can add another line for every page that you want to redirect.

derekerdmann
thanks for this. but I forgot to mention it has 3 domains pointing to it and using the same htaccess.
steamboy
@steamboy You can add another line for every page you want redirected. Just follow the format that I added to the answer, and you should be all set.
derekerdmann
+4  A: 

You could utilise mod_rewrite.

RewriteEngine On
RewriteRule ^blog/index\.php/weblog/rss_2\.0/$ /feed/ [R=302]

That should forward the URL to /feed/ on the same domain as the request came in on. Once you're happy it's working you can change the 302 to 301.

Cags