MVC on IIS without mod-rewrite plus SEO friendly URLS

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by dude81 »

Hello,

I've got this strange the problem, I would like to implement MVC with SEO friendly URLs on an IIS6.0 without using any rewrite modules. Also I don't want to show any php extension or even index of index.php. I would like if I have site on IIS running, http://www.example.com, I would like to show the module and actions in the form of http://www.example.com/module/action. How is this possible. I'm breaking my head looking for some $_SERVER['REQUEST_URI']. The challenge looks on even removing index.php which almost looks like impossible. I cannot set the change the default file name on IIS also.

Could you please throw some of your ideas on to this.

Thank You
dude81
AlanG
Forum Contributor
Posts: 136
Joined: Wed Jun 10, 2009 1:03 am

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by AlanG »

As far as I know you can't. I know little to nothing about IIS, but what your asking is like asking to print something without using any print commands. You will need to use some equivalent of Apache's Mod Rewrite!

Now what you could do is create a numerous number of directories and place various files in each of them. But if your looking for the dynamic solution and far less files... go with the url rewriting option.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by John Cartwright »

What AlanG said. Just wanted to throw out there the IIS's equivilent to mod_rewrite is ISAPI Rewrite
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by dude81 »

I cannot ask the client to buy all this and upgrade IIS with this ISAPI rewrite for my experiments. But I somewhere think this is possible, but trying hard to figure out... Please let me know, if you could find any solution.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by John Cartwright »

dude81 wrote:I cannot ask the client to buy all this and upgrade IIS with this ISAPI rewrite for my experiments. But I somewhere think this is possible, but trying hard to figure out... Please let me know, if you could find any solution.
It has a free license, so you know..

You need the right tools for the job. Period. I will eat my words if I'm wrong.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by dude81 »

But it runs some hundreds of websites... its Risk..
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by John Cartwright »

Again, this needs to be implemented at the server level simply because this is not the default behavior of the server software. However, I did find the "official" rewrite module for IIS found here
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by papa »

dude81 wrote:But it runs some hundreds of websites... its Risk..
Don't you have a test environment ?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by John Cartwright »

papa wrote:
dude81 wrote:But it runs some hundreds of websites... its Risk..
Don't you have a test environment ?
What caught my attention more was he was running hundreds of sites from a single server! I generally limit the # of medium volume sites to 4-5 per dedicated box.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by dude81 »

Unfortunately No :(
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by John Cartwright »

dude81 wrote:Unfortunately No :(
Why don't you set up a test environment on your own computer then?
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by dude81 »

yeah, thats hard to remove apache from the system,it hurts somewhere :wink: but I think that is the only way
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by papa »

John Cartwright wrote:
papa wrote:
dude81 wrote:But it runs some hundreds of websites... its Risk..
Don't you have a test environment ?
What caught my attention more was he was running hundreds of sites from a single server! I generally limit the # of medium volume sites to 4-5 per dedicated box.
Yeah hundreds sounds a bit much :)

We have about 60 internet sites on 2 load balanced servers and it works fine. But It's not that heavy traffic.


OP: We use ISAPI but nothing I've worked with so can't help you there. Only used Apache's rewrite.
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: MVC on IIS without mod-rewrite plus SEO friendly URLS

Post by papa »

dude81 wrote:yeah, thats hard to remove apache from the system,it hurts somewhere :wink: but I think that is the only way
That's why you create virtual machines. :)

Create one similar to your client's production environment and fire away.
Post Reply