Windows 7 Forums


Reply
Thread Tools

Domain change; how to set up htaccess redirect for files?

 
 
Core Core is offline
throwing darts
Core's Avatar
Join Date: Feb 2009
Location: Akaa, Finland
Posts: 849
Thanked: 177
Send a message via MSN to Core Send a message via Yahoo to Core Send a message via Skype™ to Core Core's Twitter Pag
 
      10-04-2010
I am not sure whether this belongs in Software or in some other forum, but I'm sure a mod will move it where it belongs if I got it wrong...

I am moving a blog from domain A to domain B. I would like to modify the .htaccess so that if someone goes to olddomain/blog/post8.php, they'll be redirected to newdomain/blog/post8.php, without me having to set this up for each post separately. There should be a way to do it with htaccess.

I've already set up a wildcard redirection through cPanel for the domain, but that just takes any address under the old domain into the root of the new one...

Thanks for any possible help.
 
Reply With Quote
 
 
 
 
Fire cat Fire cat is offline
Established Member
Join Date: Mar 2010
Posts: 1,156
Thanked: 164
 
      10-04-2010
Try this in the .htaccess file:
Quote:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
Haven't tried it, but it should work.
 
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 7 on a NT4 domain timuk Windows 7 Support 3 04-10-2010 11:04 AM
Trying to join domain with W7 workstations in Workgroup darcy Windows 7 Support 1 01-23-2010 12:26 PM


All times are GMT +1. The time now is 01:12 PM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33