![]() |
URL Redirect Question 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, |
Re: URL Redirect Question 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> |
Re: URL Redirect Question 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> |
Re: URL Redirect Question 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"); } |
Re: URL Redirect Question 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 |
Re: URL Redirect Question Quote:
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, |
Re: URL Redirect Question Quote:
|
Re: URL Redirect Question Quote:
But wouldn't it be a problem in case user's browser is not supported (disabled javascript). |
Re: URL Redirect Question Create the following file in the external directory: index.php The code of that file should be: Code: <?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! :) |
Re: URL Redirect Question Quote:
When you say "Create the following file in the external directory: index.php", what do you mean by "external directory"? |
Re: URL Redirect Question Quote:
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. |
Re: URL Redirect Question 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. ;) |
Re: URL Redirect Question Quote:
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, |
Spa Uniforms 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. |
Re: URL Redirect Question Quote:
301 Permanent Redirect |
Re: Spa Uniforms Quote:
|
Re: URL Redirect Question Quote:
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 |
Re: URL Redirect Question Just use the 301 redirect method... |
Re: URL Redirect Question or you can always do a dns redirect at your domain DNS settings |
Re: URL Redirect Question 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"); } |
Re: URL Redirect Question <? header("Location: http://mynewsite.com"); ?> |
| All times are GMT -6. The time now is 11:40 AM. |