Solved

301 redirect - PHP and  IIS6

Posted on 2009-07-05
3
508 Views
Last Modified: 2013-12-14
Hi

I've got a new website, the old one was .php, the new one is .aspx

i'm tryng to setup 301 redirects to intercept the old URLs and point to new ones

firstly it is important to note, I'm not trying to host PHP files
I simply want IIS to incerpt the PHP files, and then redirect to the aspx equivelent.

is there anyway of doing this without installing 3rd party components?

I was thinking you could create an isapi extension that somehow makes it work?

any advice apprecitated

also..... the urls have url parameters (index.php?page=1234)

0
Comment
Question by:paulCardiff
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Hube02 earned 500 total points
Comment Utility
While it is 3rd party software, and you are looking to do this without 3rd party software, I would still highly recommend using the ISAPI Rewrite module by from Helicon: http://www.isapirewrite.com/
The reason is that it will be the easiest way to do it.

Without this you will need to configure IIS for each and every page that needs to be redirected, as far as I know. I personally try to avoid this, but here is a reference on how to do redirects: http://www.getfoundnow.com/iis_301_redirect.htm

To be completely honest, I'm not even sure if what you are looking for is possible.

Your third option, which you were also looking to avoid would be to install PHP and create redirects with PHP pages.

A final option that I would consider second after the Rewrite Module would be to set up a custom 404 page where I would analyze the requested URI. If it was a PHP page then decide what page to send them to.

Anyway, I would consider the possibilities in the following order:

1) ISAPI Rewrite Module
2) Custom 404 page
3) Install PHP and redirect per page
4) Configuring IIS6 to do the redirects

Others may have a different opinion, or be able supply more information.
0
 
LVL 18

Expert Comment

by:Hube02
Comment Utility
Just curious which method you decided upon.
0
 

Author Comment

by:paulCardiff
Comment Utility
i used a shared hosting account i have access too, and setup the domain on this (its php)
I then used that to point to the windows server (other domain) using .htaccess files

crude but affective
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now