URL Redirection help needed

anishrip23

Regular Member
Joined
Jul 17, 2011
Messages
206
Reaction score
79
Hey guys need help its urgent.

How to redirect xxxxxxxx.com/video-1/ to yyyyyyyy.com/video-1/
I want to change only website but not remaining url


Thanks!!
 
edit your .htaccess file at the root of your original domain (or create one) and create a 301 redirect....

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) hppt://yournewdomain.c0m/$1 [R=301,L]:

That should redirect your entire domain. Or did you want to do just the one page?

(The domain should be the full URL, but I can't post proper looking URLs yet!)
 
Thanks for your help.. I have already solved my problem..
 
How i did it
Here's the code if anyone needed this


Code:
Options +FollowSymlinks -MultiViews
RewriteEngine on

# for http
RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC]
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*)$ http://www.domainB.com/$1 [R=301,L]

# for https
RewriteCond %{HTTP_HOST} ^(www\.)?domainA\.com$ [NC]
RewriteCond %{SERVER_PORT} =443
RewriteRule ^(.*)$ https://www.domainB.com/$1 [R=301,L]


It is for .htaccess
 
you can redirect using the DNS...
you can redirect using .htaccess...
you can redirect using headers...
and

you can redirect using meta refresh.

Is it a 301 or a 302 redirect? and does SEO matter?
 
you can redirect using the DNS...
you can redirect using .htaccess...
you can redirect using headers...
and

you can redirect using meta refresh.

Is it a 301 or a 302 redirect? and does SEO matter?
Yes it is 301.
I needed that code for some other purpose not for seo so can't tell you about this.
 
Last edited:
you might want to check it...

301 is permanent, I believe...
if it's 302 then change 301 to 302.
 
just write this code in your .htaccess file (it should be in you root directory, if isn't there just create one with a text editor like notepad and upload by ftp)
Code:
Redirect 301 http://old-address http://newaddress

if you want a 302 redirect just change 301 to 302
 
Back
Top