Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: 301 Redirect Help |
|
Author |
|
upthegut34
Joined: 12 Feb 2008 Posts: 5
|
Posted: Tue 12 Feb '08 3:48 Post subject: 301 Redirect Help |
|
|
New to WAMP. So I apologize for my ignorance on some things.
Basically I'm trying to write 301 redirects to our new domain. My problem, more specifically, is that my bread-n-butter directory has been renamed.
old-domain.com/bboard2
to
new-domain.com/forum
Since we run a message board, I need to redirect all of those old threads/folders/files from the /bboard2 directory and keep my search engine cred. I've come close, but can't quite get it all worked out.
I'm trying to avoid using .htaccess files, since....as I understand it....Apache looks for them in every directory, every time a file is called. Am I on the right track there?
Thank you for your time. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 12 Feb '08 11:00 Post subject: |
|
|
You can do 2 things. Choose one, not both
Code: |
Redirect permanent /bboard2 http://new-domain.com/forum
|
works only with mod_rewrite
Code: |
RewriteEngine On
RewriteRule (.*) http://new-domain.com/forum %{REQUEST_URI}
|
|
|
Back to top |
|
upthegut34
Joined: 12 Feb 2008 Posts: 5
|
Posted: Tue 12 Feb '08 14:55 Post subject: |
|
|
Thanks. I used the first one and it works great.
Is there any benefit to using one over the other? It would seem like rewrite would be faster. But is there a hit from an SEO standpoint?
Where would I put your quoted rewrite text. In the domain's VirtualHost entry?
Thank you again. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
|
Back to top |
|
|
|
|
|
|