Home » Htaccess Tools » Questions regarding htaccess » Redirect folder to subdomain
Redirect folder to subdomain [message #902] Fri, 14 March 2008 09:24 Go to next message
subirghosh  is currently offline subirghosh
Messages: 2
Registered: March 2008
Location: New Delhi, IndiaJournalis...
Recently I removed some content from the main site (http://www.domainname.com/) to a subdomain (http://archives.domainname.com/). Some content. Not all.

What I am seeking to do is something like this:

Redirect http://www.domainname.com/news-analyses/*.* TO http://archives.domainname.com/news-analyses/*

For this I tried using in my htaccess file:

Redirect /news-analyses http://archives.domainname.com/news-analyses/


This is not working because the server is creating a loop for http://archives.domainname.com/news-analyses/ as well.

How should this be changed?
Re: Redirect folder to subdomain [message #916 is a reply to message #902 ] Tue, 15 April 2008 18:14 Go to previous messageGo to next message
andreas  is currently offline andreas
Messages: 239
Registered: January 2005
Location: Denmark

Site Admin
Try this:

RewriteCond %{HTTP_HOST} ^(www.)?domainname.com$
RewriteRule ^/news-analyses/(.*)$ http://archives.domainname.com/news-analyses/$1 [R]
Re: Redirect folder to subdomain [message #918 is a reply to message #916 ] Wed, 16 April 2008 06:23 Go to previous message
subirghosh  is currently offline subirghosh
Messages: 2
Registered: March 2008
Location: New Delhi, IndiaJournalis...
Thanks a lot Andreas Smile
Previous Topic:RewriteRule Problem
Next Topic:Rewriterule with 2 x parenthesis
Goto Forum:
  


Current Time: Sat May 17 07:36:49 CEST 2008

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software