Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

301 redirect - PHP and  IIS6

Posted on 2009-07-05
3
516 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
ID: 24780268
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
ID: 24816388
Just curious which method you decided upon.
0
 

Author Comment

by:paulCardiff
ID: 24838168
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

839 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