homepage Welcome to WebmasterWorld Guest from 54.211.230.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
Redirection 301 - On URL or on file?
robinponty

10+ Year Member



 
Msg#: 31850 posted 7:05 am on Nov 3, 2005 (gmt 0)

Hi,
Can somebody advice that a 301 rediction can be implemented to a complete file or I can have it on various URLs with the same file name but different query string.

Like

I have a file

mydomain.com/index.asp?id=1
mydomain.com/index.asp?id=2

Now I want to put 301 redirection on this site and want to take mydomain.com/index.asp?id=1 to a different file and mydomain.com/index.asp?id=2 a different file..Is it possible? Or I can just have this on a complete file where index.asp will be redirected to one URL only.

Thanks
Rob

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 31850 posted 12:44 am on Nov 6, 2005 (gmt 0)

You can redirect a whole site or one file at a time.

You can do this by using mod_rewrite in the .htaccess file, or by using a PHP script tacked onto the front of the PHP page.

robinponty

10+ Year Member



 
Msg#: 31850 posted 4:32 am on Nov 6, 2005 (gmt 0)

Hello
Thanks for the reply.

Please note that I have an Asp site and I want to implement this to not at the file level but at the URL level.

Can you Please advice. We are using IBM's red dot CMS.

thanks
Rob

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 31850 posted 8:12 am on Nov 6, 2005 (gmt 0)

Oh that should be easy then. There is an ASP command, something like Response.Header that you can use to send the redirect. The code goes before the <html> tag of each page that you don't want people to access the content on any longer. Make sure that the response really is 301 and NOT 302 when you do it. Google for ASP 301 redirect for the 2 lines of code you need. Use WebBug to check the header.

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 31850 posted 8:42 am on Nov 6, 2005 (gmt 0)

<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.newdomain.com/page.html"
Response.End
%>

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved