Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Search Engine Optimization (SEO) (http://www.go4expert.com/forums/seo-forum/)
-   -   301 redirect - need help please.. (http://www.go4expert.com/forums/301-redirect-help-t5180/)

YS* 10Jul2007 13:52

301 redirect - need help please..
 
need to 301 redirect like that -
www.domain.com/dir/index.php

will be redirected to

www.anotherdomain.com/index.php

and all the other pages as well,
for example
www.domain.com/dir/forumdisplay.php?f=92

will 301 redircet to
www.anotherdomain.com/forumdisplay.php?f=92
and all the posts and threads as well..
vBulletin board, I basically want that a user that will try to teach a page in the board on the dir',
will be redirected to the same page in the new domain (301)

thanks a lot for the help.

shabbir 10Jul2007 16:57

Re: 301 redirect - need help please..
 
Search Engine Optimization FAQ's has your answer and I will quote it here.

Quote:

Originally Posted by SEO Faq's
Code:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]



YS* 10Jul2007 17:17

Re: 301 redirect - need help please..
 
it doesn't work..

PHP Code:

RewriteEngine On
RewriteCond 
%{HTTP_HOST} ^(www\.)?atraf-f.net\.net/upload$ [NC]
RewriteRule ^(.*)$ http://www.atraf-f.net/$1 [R=301,L] 

i've edited it, i need it to redirect all the pages from in a directory to an other domain name,
here i'vw just tested the code so i've used the same domain, what to do ?

shabbir 10Jul2007 18:38

Re: 301 redirect - need help please..
 
The inherent problem I see in your editing capabilities is you are changing all the \. to .

YS* 10Jul2007 19:00

Re: 301 redirect - need help please..
 
still not working..
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?atraf-f\.net/upload$ [NC]
RewriteRule ^(.*)$ http://www.atraf-f.net/$1 [R=301,L]

shabbir 10Jul2007 19:43

Re: 301 redirect - need help please..
 
I am not sure why its not working but when I visited the forum I saw you are setting up the new forum and so why not just move the files from the upload directory to the parent one. Unnecessary redirect would not help.

YS* 10Jul2007 19:58

Re: 301 redirect - need help please..
 
i have another board
www.atraf-f.net/or
i bought a new domain for it - www.israelbody.org
and i want all the users to be redirected to the new domain (+ all the google pages)

shabbir 11Jul2007 09:01

Re: 301 redirect - need help please..
 
Does your web host support the .htaccess redirect? It may be the case that it does not.

YS* 11Jul2007 16:20

Re: 301 redirect - need help please..
 
off course.
i'm using redirects in my root folder..

shabbir 11Jul2007 18:38

Re: 301 redirect - need help please..
 
But then you should always use the code I gave in the root folder only.


All times are GMT +5.5. The time now is 00:05.