Shoutbox

Help with website redirection - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Help with website redirection (/showthread.php?tid=66601)

Help with website redirection by Felu on 09-24-2006 at 12:09 PM

I want to redirect http://mno.def.com/xyz to http://abc.def.com/xyz . I tried google but i didn't find something useful.
Anybody knows how to do it?

Help will be appreciated and thanks in advance.


RE: Help with website redirection by -dt- on 09-24-2006 at 12:18 PM

http://www.google.com/search?q=.htaccess+redirect...l&client=firefox-a


RE: Help with website redirection by Sunshine on 09-24-2006 at 01:28 PM

Example:

Between the header tags on index page:
<meta http-equiv="refresh" content="10; URL=http://sunshineweb.org/">

in the body:

This website has moved to http://www.sunshineweb.org<br>
If your browser does not automatically redirect you in 10 seconds<br>
click <a href="http://www.sunshineweb.org">here</a> to go to the new site.



Simply replace the urls you wish to redirect your site too. You can change the redirection time too, for that you change the 10 after content= in the meta tag.


RE: Help with website redirection by Felu on 09-24-2006 at 01:39 PM

I think you didn't get what i meant. I meant any value of xyz could be used [Image: msn_tongue.gif].

quote:
Originally posted by Sunshine
<meta http-equiv="refresh" content="10; URL=http://sunshineweb.org/">
<meta http-equiv="refresh" content="10" URL=http://sunshineweb.org/"> ;)
RE: Help with website redirection by Sunshine on 09-24-2006 at 01:44 PM

quote:
Originally posted by -!Felu!-
I think you didn't get what i meant. I meant any value of xyz could be used [Image: msn_tongue.gif].
Then i don't get you...a website has an addy not a random xyz...
Anyways the redirect i posted you can put on any page you wish to redirect, but normally only the entrypage will do to redirect the whole site since ppl tend to see that page first. Just make sure you put in the correct urls.
quote:
quote:
Originally posted by Sunshine
<meta http-equiv="refresh" content="10; URL=http://sunshineweb.org/">
<meta http-equiv="refresh" content="10" URL=http://sunshineweb.org/"> ;)
no no, the 10; belongs within the same quotes as the url (its all under the definition content=)
RE: Help with website redirection by alexp2_ad on 09-24-2006 at 01:45 PM

Create a file called .htaccess and in it write:

code:
RewriteEngine On
Options +FollowSymlinks

RewriteRule ^(.*)$ http://abc.def.com/$1 [r=301,nc]

Assuming it's an apache server, that'll work.

Edit:  Oh, and put it in the place you're redirecting from. ;)
RE: Help with website redirection by Felu on 09-24-2006 at 01:48 PM

quote:
Originally posted by Sunshine
Then i don't get you...a website has an addy not a random xyz...
I meant that if the user goes to -
1. http://mno.def.com/page.html he gets redirected to http://abc.def.com/page.html
2. http://mno.def.com/home.php he gets redirected to http://abc.def.com/home.php
3.
http://mno.def.com/index.php?c=te he gets redirected to http://abc.def.com/index.php?c=te
etc....

RE: Help with website redirection by Menthix on 09-24-2006 at 01:50 PM

quote:
Originally posted by -!Felu!-
<meta http-equiv="refresh" content="10" URL=http://sunshineweb.org/">
No, the quote sign doesn't belong there, Sunshine had it right. I'm late :p

You can use 0 as time to do a instant redirect (in that case you don't even need a body since it will never show):
code:
<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.google.com">

RE: Help with website redirection by Sunshine on 09-24-2006 at 01:53 PM

quote:
Originally posted by -!Felu!-
quote:
Originally posted by Sunshine
Then i don't get you...a website has an addy not a random xyz...
I meant that if the user goes to -
1. http://mno.def.com/page.html he gets redirected to http://abc.def.com/page.html
2. http://mno.def.com/home.php he gets redirected to http://abc.def.com/home.php
3.
http://mno.def.com/index.php?c=te he gets redirected to http://abc.def.com/index.php?c=te
etc....

Every page has a header right? All you have to do is change the metatag to hold the correct redirection url...

1. http://mno.def.com/page.html he gets redirected to http://abc.def.com/page.html
on that page you use the url http://abc.def.com/page.html as redirection url
2. http://mno.def.com/home.php he gets redirected to http://abc.def.com/home.php
Here you use http://abc.def.com/home.php as redirection url.

Understand? Ofcourse if you use php to load the same header everywhere then every page will get redirected to wichever you set in the header to be loaded.


RE: Help with website redirection by Felu on 09-24-2006 at 02:00 PM

quote:
Originally posted by Sunshine
Every page has a header right? All you have to do is change the metatag to hold the correct redirection url...

1. http://mno.def.com/page.html he gets redirected to http://abc.def.com/page.html
on that page you use the url http://abc.def.com/page.html as redirection url
2. http://mno.def.com/home.php he gets redirected to http://abc.def.com/home.php
Here you use http://abc.def.com/home.php as redirection url.

Understand?
I can't make each and every possibility [Image: msn_tongue.gif].

quote:
Originally posted by alexp2_ad
Create a file called .htaccess and in it write:

code:
RewriteEngine On
Options +FollowSymlinks

RewriteRule ^(.*)$ http://abc.def.com/$1 [r=301,nc]

Assuming it's an apache server, that'll work.

Edit:  Oh, and put it in the place you're redirecting from. [Image: msn_wink.gif]
Where to put the place i'm redirecting from?
RE: RE: Help with website redirection by alexp2_ad on 09-24-2006 at 02:03 PM

quote:
Originally posted by -!Felu!-
quote:
Originally posted by alexp2_ad
Create a file called .htaccess and in it write:

code:
RewriteEngine On
Options +FollowSymlinks

RewriteRule ^(.*)$ http://abc.def.com/$1 [r=301,nc]

Assuming it's an apache server, that'll work.

Edit:  Oh, and put it in the place you're redirecting from. [Image: msn_wink.gif]
Where to put the place i'm redirecting from?

Put it in the place where the files would go... if you wanted it to redirect from http://mno.def.com/ then put it in the directory for that.
RE: Help with website redirection by Felu on 09-24-2006 at 02:09 PM

Thanks a lot Alex. That was exactly what i wanted [Image: msn_grin.gif]. Thanks again [Image: msn_wink.gif].


RE: Help with website redirection by matty on 09-24-2006 at 02:26 PM

code:
<script>window.location='http://abc.def.com/xyz';</script>

RE: Help with website redirection by Menthix on 09-24-2006 at 02:37 PM

quote:
Originally posted by Matty
<script>window.location='http://abc.def.com/xyz';</script>
Not preferred because it needs javascript enabled, when you use something like that, make sure you provide an alternative for people with script disabled.

But looks like Felu already got it anyway :).
RE: Help with website redirection by matty on 09-24-2006 at 03:07 PM

quote:
Originally posted by MenthiX
quote:
Originally posted by Matty
<script>window.location='http://abc.def.com/xyz';</script>
Not preferred because it needs javascript enabled, when you use something like that, make sure you provide an alternative for people with script disabled.

But looks like Felu already got it anyway :).
Just providing all the possibilities.