View Full Version : 301 redirect from subdomain to domain
I have a site which was in a subdomain (when I mean subdomain i mean http://sub.domain.com) which I now want to move to its own domain... can I just redirect the whole lot at once like this
Redirect /olddirectory http://yoursite.com/or do I have to do each page separately?
Cutter
06-28-2007, 01:20 PM
This is what I used with .htaccess to redirect a forum to its another domain name
AddType application/x-httpd-php .htm .html
Redirect 301 /forum http://www.newdomain.com/forum
Try this; I am not certain if it will work but this is basically what you want:
Redirect 301 http://forum.olddomain.com http://www.newdomain.com
Osirion
01-26-2008, 12:57 AM
Hey guys,
I just finished re-designing my whole site. I used to have subdomains for subsections of my site and I want to do away with that and go to directories.
I used to have:
1) subdomain.whatever.com
2) subdomain.whatever.com/index.php?section=somepage
Now I want to have it redirected
1) www.whatever.com/some_new_folder_name
2) http://www.whatever.com/some_new_fol..._page_name.htm
This is what I have - Im really stuck when it comes to (2):
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^hosting.osirion.co.za [NC]
RewriteRule ^(.*)$ http://www.osirion.co.za/web_hosting/ [L,R=301]
Please help! You can also suggest how to fix the above if its un-optimal/wrong :P THANKS!
Powered by vBulletin® Version 4.2.2 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.