Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 18th Sep 2011, 09:52 AM   #1
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
URL Redirect Question
Share on: 
fb share twitter share gplus share more share

I need help in how to get a URL redirected to an external website but keeping the link of my own site (of that external link).

Let me explain it a little:

My Site link I need to redirect: www.mysitelink.com/external
External Site that should open when above link is clicked: www.externalsitelink.com

Now when someone clicks on mysitelink.com/external, I need to redirect the page to www.externalsitelink.com (to a new site).

How can I do it?

Thanks,
biznics is offline  
Unread 18th Sep 2011, 01:29 PM   #2
Active Warrior
War Room Member
 
Join Date: 2011
Location: Wheaton, IL
Posts: 91
Thanks: 10
Thanked 10 Times in 7 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Well,

There's a couple of ways to do this. You can always "cheat" and display the link text as www.mysitelink.com/external, but really it will point to www.externalsitelink.com. Here's the HTML code to do this:

<a href="www.externalsitelink.com">www.mysitelink.com/external</a>


The other way to do this is if the "external" part of your URL is a directory, then create an index.html file inside that directory with the following content:

<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.externalsitelink.com">
</head>
</html>

maxmalini is offline  
Unread 18th Sep 2011, 01:48 PM   #3
HyperActive Warrior
 
jade69's Avatar
 
Join Date: 2010
Posts: 125
Thanks: 0
Thanked 17 Times in 16 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

If you want to keep that original link you can use a frame redirect script.


<HTML><HEAD>
</HEAD>
<FRAMESET border=0 rows="100%,*" frameborder="no"
marginleft=0 margintop=0 marginright=0 marginbottom=0>
<frame
src="http:/
www.externalsitelink.com"
scrolling=auto frameborder="no" border=0 noresize>
<frame topmargin="0" marginwidth=0 scrolling=no marginheight=0
frameborder="no" border=0 noresize>
</FRAMESET>
</HTML>

jade69 is offline  
Unread 19th Sep 2011, 08:45 PM   #4
SQLMgmt.com
 
Join Date: 2011
Location: Seattle
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

If you're using ASP.NET, one simple way of doing it is
create default.aspx under external folder and in the Page_Load event handler, redirect the URL:

Page_Load()
{
Response.Redirect("external_site_name_here");
}
SQLMgmt is offline  
Unread 20th Sep 2011, 02:56 AM   #5
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Thanks for all the replies guys.

@maxmalini: About the second method, should I add the directory to the EXTERNAL site? Because I don't have any authority/access to the external site and I only want to add links within my site to be redirected to the external site. Thanks

@jade69: Please tell me, I have a bunch of links that I want to redirect; so can I add all of them in the same iframe method; you mentioned? And is it search engine friendly? Thanks

I've seen a site similar to what I require (URL functionality):

web hosting geeks . com (remove spaces)

There, you can mouse-over the first link; InMotion. It is redirecting to Business Web Hosting | InMotion Hosting. But the link on the geeks page is actually different than the landing page.

That is the same redirect method I need.

Thanks
biznics is offline  
Unread 23rd Sep 2011, 02:14 PM   #6
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by upendraets View Post

Just use 301 redirection code for changing URL in your .htaccess file .
Thanks.

Please clear, can using redirection for so many URLS to different external sites cause any problem; from both; hosting point of view (as I am using shared hosting) and from SEO point of view?

Regards,
biznics is offline  
Unread 23rd Sep 2011, 08:25 PM   #7
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 471
Thanks: 30
Thanked 234 Times in 34 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by biznics View Post

Thanks for all the replies guys.

@maxmalini: About the second method, should I add the directory to the EXTERNAL site? Because I don't have any authority/access to the external site and I only want to add links within my site to be redirected to the external site. Thanks

@jade69: Please tell me, I have a bunch of links that I want to redirect; so can I add all of them in the same iframe method; you mentioned? And is it search engine friendly? Thanks

I've seen a site similar to what I require (URL functionality):

web hosting geeks . com (remove spaces)

There, you can mouse-over the first link; InMotion. It is redirecting to Business Web Hosting | InMotion Hosting. But the link on the geeks page is actually different than the landing page.

That is the same redirect method I need.

Thanks
Are you referring to the URL displayed in the status bar is different from the actual link? If so, that's something you can do w/ Javascript--i.e. w/ Javascript, you can change the status text to whatever you want.

dtang4 is offline  
Unread 24th Sep 2011, 12:03 PM   #8
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by dtang4 View Post

Are you referring to the URL displayed in the status bar is different from the actual link? If so, that's something you can do w/ Javascript--i.e. w/ Javascript, you can change the status text to whatever you want.
Thanks for the response.

But wouldn't it be a problem in case user's browser is not supported (disabled javascript).
biznics is offline  
Unread 24th Sep 2011, 04:20 PM   #9
Limitless Ambition
War Room Member
 
cardine's Avatar
 
Join Date: 2011
Posts: 249
Thanks: 27
Thanked 39 Times in 23 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Create the following file in the external directory: index.php

The code of that file should be:
Code:
<?
header("Location: http://whateveryouwantyourexternalsitetobe.com");
?>
That is the standard way of doing this.

There is no problems with hosting or SEO by doing this. Most sites link out, and using an internal link to do a 301 redirect is not harmful at all.


Hope that helps!
cardine is offline  
Unread 24th Sep 2011, 08:21 PM   #10
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by cardine View Post

Create the following file in the external directory: index.php

The code of that file should be:
Code:
<?
header("Location: http://whateveryouwantyourexternalsitetobe.com");
?>
That is the standard way of doing this.

There is no problems with hosting or SEO by doing this. Most sites link out, and using an internal link to do a 301 redirect is not harmful at all.


Hope that helps!
Thanks for hoping in mate.

When you say "Create the following file in the external directory: index.php", what do you mean by "external directory"?
biznics is offline  
Unread 24th Sep 2011, 11:16 PM   #11
HyperActive Warrior
War Room Member
 
lovenot's Avatar
 
Join Date: 2011
Posts: 129
Thanks: 2
Thanked 13 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by dtang4 View Post

Are you referring to the URL displayed in the status bar is different from the actual link? If so, that's something you can do w/ Javascript--i.e. w/ Javascript, you can change the status text to whatever you want.
If this is what you want to do, use iframe definitely.

However, it is impossible for you to just use scripts like he said. Javascript is NOT able to change the url of your web browser as that would cause a major security issue.

lovenot is offline  
Unread 25th Sep 2011, 04:25 AM   #12
GCY
Warrior Member
 
GCY's Avatar
 
Join Date: 2011
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Hi,

I would use as well the htaccess method. Yes, you can add as many redirections as you like in the htaccess.
The advantage in compare with the folder method (and index.html or index.php) is that you have to edit 1 file, when there are changes somewhen. And your file structure is not growing like hell in case you have 100 external links.

Automate your SEO controlling and save a lot of time with Serp & SEO Monitor. Just a few features of that great SEO Software are automated keyword ranking check, automated backlink check (if your backlink still exists on the page of your link swap partner), personalized reports, long-term analysing with graphs and many more.
GCY is offline  
Unread 25th Sep 2011, 12:56 PM   #13
HyperActive Warrior
War Room Member
 
Join Date: 2010
Posts: 168
Thanks: 29
Thanked 12 Times in 12 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by DEaFeYe View Post

I hate seeing threads repeatedly bumped when the answer is a simple google search away... and also when the 1st response got the answer 100% correct.

But, maybe if I answer it this way this thread question will die

You have a site www.yoursite.com

when you go to that, some file is serving it... in a lot of cases its an index.html or index.php or yatta yatta totally depends on how you're hosting things.

So... instead of that file, you create one to handle the address:
www.yoursite.com/external

or external.html

or external.php

or whatever... using whatever tech can even be a straight html page it doesn't matter as long as the link is being served by a page.


Then, that page should contain the following html when rendered replacing with real data/links as appropriate:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
<BODY>
Optional page text here.
</BODY>
</HTML>



If at this point you need more clarity this forum simply cannot help you. Pick up some reading material about how your site is hosted.
I must say; this is the response I was waiting for. Thanks a ton mate. Where were you all this time.

One more thing please (relevant to my thread), the code/method you told me, is this SEO friendly? I mean, creating so many blank/redirection pages? Will Google take it as a SPAM or does Google understands this method already?

Sorry for newbie question; but the fact is; I am still a newbie when it comes to programming.

Thanks,
biznics is offline  
Unread 26th Sep 2011, 04:12 AM   #14
Spa Uniforms
 
Join Date: 2011
Location: Dandenong
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Spa Uniforms
Share on: 
fb share twitter share gplus share more share

If your site is based on .net platform then idon't know how to do 301 permanent redirection. But If your site is based on php platform then you can do 301 permanent redirection with the help of .htaccess file.

spabeauty is offline  
Unread 26th Sep 2011, 04:33 AM   #15
HyperActive Warrior
 
Join Date: 2010
Location: USA
Posts: 449
Thanks: 2
Thanked 36 Times in 31 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by biznics View Post

I need help in how to get a URL redirected to an external website but keeping the link of my own site (of that external link).

Let me explain it a little:

My Site link I need to redirect: www.mysitelink.com/external
External Site that should open when above link is clicked: www.externalsitelink.com

Now when someone clicks on mysitelink.com/external, I need to redirect the page to www.externalsitelink.com (to a new site).

How can I do it?

Thanks,
Used this link for your redirect work
301 Permanent Redirect
rosesmark is offline  
Unread 26th Sep 2011, 06:57 AM   #16
Warrior Member
 
Join Date: 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: Spa Uniforms
Share on: 
fb share twitter share gplus share more share

Originally Posted by spabeauty View Post

If your site is based on .net platform then idon't know how to do 301 permanent redirection. But If your site is based on php platform then you can do 301 permanent redirection with the help of .htaccess file.
Yes -- it would be helpful knowing what platform you are working in as many of the tools to help you are very different. However, with that said both platforms use .htaccess -- on .NET I would recommend using Helicon ISAPI. It is basically a ISAPI filter that allows your HTACCESS file to be checked before calling IIS. Good luck.
gmoney004 is offline  
Unread 27th Sep 2011, 03:06 AM   #17
Limitless Ambition
War Room Member
 
cardine's Avatar
 
Join Date: 2011
Posts: 249
Thanks: 27
Thanked 39 Times in 23 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by biznics View Post

Thanks for hoping in mate.

When you say "Create the following file in the external directory: index.php", what do you mean by "external directory"?
I meant the directory you were linking to.

If you are linking to www.mysitelink.com/external then you want to create the index.php file in this directory: /home/yoursite/public_html/external
cardine is offline  
Unread 27th Sep 2011, 03:17 AM   #18
Warrior Member
 
Join Date: 2011
Posts: 27
Thanks: 0
Thanked 1 Time in 1 Post
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Just use the 301 redirect method...
creativerobert is offline  
Unread 27th Sep 2011, 08:47 PM   #19
Active Warrior
 
Join Date: 2009
Posts: 46
Thanks: 8
Thanked 2 Times in 2 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

or you can always do a dns redirect at your domain DNS settings
marksz is offline  
Unread 21st Oct 2011, 05:56 AM   #20
HyperActive Warrior
 
DavidWincent's Avatar
 
Join Date: 2011
Location: NY
Posts: 110
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

Just a simple code you need to insert:

<a href="www.externalsitelink.com">www.mysitelink.com/external</a>

If you're using ASP.NET then create default.aspx under external folder and in the Page_Load event handler, redirect the URL:

Page_Load()
{
Response.Redirect("external_site_name_here");
}

Webmaster Studio -A premier web design and internet marketing company in New York.
DavidWincent is offline  
Unread 24th Oct 2011, 06:30 AM   #21
Senior Web Developer
War Room Member
 
wasabi20's Avatar
 
Join Date: 2011
Location: Quebec, Canada
Posts: 113
Thanks: 32
Thanked 19 Times in 17 Posts
Default
Re: URL Redirect Question
Share on: 
fb share twitter share gplus share more share

<? header("Location: http://mynewsite.com"); ?>
wasabi20 is offline  
Closed Thread


Bookmarks

Tags
question, redirect, url


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 Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:49 AM.