homepage Welcome to WebmasterWorld Guest from
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?

 7:05 am on Nov 3, 2005 (gmt 0)

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.


I have a file


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.




 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.


 4:32 am on Nov 6, 2005 (gmt 0)

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.



 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.


 8:42 am on Nov 6, 2005 (gmt 0)

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

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