Forum Moderators: phranque

Message Too Old, No Replies

problems with 301 redirect.

301 redirect

         

sarumu1

6:34 pm on Feb 14, 2005 (gmt 0)

10+ Year Member



hi everyone.

i visited this thread - [webmasterworld.com...]

and attempted to use it in the following instances for my site that is hosted by a MS ASP IIS server:

1. to redirect a .html page to a new .html page within my website.

2. to redirect a .html page to a new .asp page within my website.

I used the ASP code in the referenced thread, but simply get the code spit back at me in the browser as text.

Am I using the proper code? If not, can you direct me to a good alternative or offer other suggestions?

Thanks, Subbu.

Corey Bryant

11:07 pm on Feb 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You will need to name the page with ASP so the server knows it is ASP coding.

-Corey

sarumu1

11:16 pm on Feb 14, 2005 (gmt 0)

10+ Year Member



true that could work, but search engines have already indexed the pages as .html pages...

Corey Bryant

11:35 pm on Feb 14, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would ask the Server Admin to set something up in IIS. For an ASP page to work, the server has to know it is ASP

-Corey

labeler2003

6:51 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



You can not include ASP code in a .html page. Any page you wish to have ASP code in needs to be renamed as a ".asp" page (replace .html with .asp). Then set up a permanent redirect in IIS so the search engines will switch from indexing the ".html" pages and start indexing the ".asp" pages.

However, if you are just redirecting traffic from an .html page to a .asp page, skip adding ASP code and do the redirect in IIS.

If you do not have access to IIS (it's the management software used on Windows servers), or a control panel that provides an interface for making IIS changes, then the system administrator will need to make the change for you.

subbu

8:30 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



So, this is what eventually happened:

Forgive me for being ignorant of the exact technical details, but the host set up the server to "treat" .html pages as .asp, so if an .html page includes .asp code, it will be valid.

Works like a charm.

Subbu.

Corey Bryant

9:41 pm on Feb 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That can work but then all HTML pages for that site is parsed before being rendered and can slow the site down some

-Corey

subbu

9:46 pm on Feb 17, 2005 (gmt 0)

10+ Year Member



you're right. I haven't noticed any difference yet. The majority of pages on my site are .asp pages, which is probably why.

Subbu.