user3469061
user3469061

Reputation: 21

URL rewriting in IIS for a php/linux guy

I'm a PHP/linux guy....

One of my customers came to me with an existing website/hosting package....

The hosting is windows (but with PHP.....I don't know, it just is)

I need to learn how to rewrite URLs in IIS..

I understand you usually do it with a separate thing you install, called url rewrite module?....Or, is there an equivalent of the .htaccess file which i can place in the root folder?

If yes, is this something that I should expect the hosting company to already have installed?

Is it done in PERL regex in IIS?

Please HELP.

I can't change the hosting comapny or any variables (windows/linux) in the current hosting as my customer cannot have a second where the site is down...so i need to know how to rewrite urls in windows/IIS

I am willing to learn little things like this anyways, for future situations...

It's IIS 7...windows 2008 and PHP...

I don't know if it's against rules to mention names of companies...please don't grill me if it is, just giving as much info as possible and maybe someone will have the same experience as me....

its fasthost..

Thanks

Upvotes: 0

Views: 326

Answers (1)

haxtbh
haxtbh

Reputation: 3534

If you have access to the server / IIS then you can install http://www.iis.net/downloads/microsoft/url-rewrite

This will add a module where you can configure rewrites and redirects.

If you dont have access to the server / IIS and this module is installed then each web root will have a web.config file which contain the rules and other IIS configurations. You will have to contact the hosting company to see if the module is installed. It usually is.

This page gives an overview of both:

http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

Upvotes: 1

Related Questions