Results 1 to 4 of 4
-
01-13-2007, 04:54 AM #1Aspiring Evangelist
- Join Date
- May 2005
- Posts
- 367
Redirect from one folder to another via .htaccess ?
Hi All,
Quick question about redirection.
We had a subdomain that was http://gallery.mydomain.com and we have now decided we would like to use http://www.mydomain.com/gallery
I have setup the gallery on the new server as http://www.mydomain.com/gallery
I would like to be able to if someone had a link http://gallery.mydomain.com/events/harden06/ for it to redirect them too http://www.mydomain.com/gallery/events/harden06/
Any advice would be appreciated.
Regards,
Joel
-
01-13-2007, 09:16 AM #2
Place a file called ".htaccess" in the site's root, and in it, this:
Code:RewriteEngine on RewriteCond %{HTTP_HOST} ^gallery\.mydomain\.com$ [NC] RewriteRule /?(.*) http://www.mydomain.com/gallery/$1 [L,R]
-
01-13-2007, 11:23 AM #3Aspiring Evangelist
- Join Date
- May 2005
- Posts
- 367
It worked perfectly. I put it in the subdomain's root directory and everything is working.
Thankyou very very much.
Regards,
Joel
-
01-13-2007, 11:37 AM #4
Glad to help out.