301 Redirects with Frontpage & IIS Server 5

  • Thread starter Study Abroad Guru
  • Start date
S

Study Abroad Guru

I would like to set up an .htaccess file or something similar in the MS
Server environment to manage 301 redirects.
 
T

Tina Clarke

Jon Spivey said:
Hi,
There's no htaccess on IIS, you'd normally do this with some code on the
page for example in asp
<%
response.status="301 Moved Permanently"
response.addheader "Location", "http://newdomain/newpage.asp"
%>

Does the page that code is on have to be a .asp extenstion?

Tina
 
J

Jack Brewster

Tina Clarke said:
Does the page that code is on have to be a .asp extenstion?

Yes, because that's ASP code. PHP's version of that code would need to end
with .php.

Of course, the server can be configured to parse _any_ extension, so it's
conceivable that you could tell the ASP interpreter to process .htm, .php,
..anything, so, in that case it wouldn't need to be .asp. Of course, that's
just crazy talk... :)

If a user is managing their own IIS server, I'd recommend using IIS'
features for redirecting instead of a redirect script. But most folks are
hosted so Jon's code (or other language equivalent) would be necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top