Solved

How to rewrite php URLs in IIS7?

Posted on 2011-03-13
5
698 Views
Last Modified: 2013-12-13
O need to know how to rewrite php URLs to make them SEO friendly on a Microsoft server.

 I inherited a site that was done in php. I moved it to my server which is a Microsoft server running IIS7. The client does not want to pay me to change it to asp.net so I'm kind of stuck. But he pays well - and on time!

Links look like this: <a href="?p=about"> where p is a folder that contains the about.php page.

I want to use SEO friendly URLs but I don't know how to do that in iis7.

Can anyone point me in the right direction?

Best,
MHenry
0
Comment
Question by:MHenry
5 Comments
 
LVL 17

Accepted Solution

by:
shinuq earned 500 total points
Comment Utility
Yes you cant use the .htaccess in IIS, Instead there is a web.config file that works similarly to .htaccess.

Visit this URL to learn how to do a rewrite  in IIS

http://www.iis.net/download/urlrewrite

Hope this helps
0
 
LVL 17

Assisted Solution

by:shinuq
shinuq earned 500 total points
Comment Utility
http://www.hanselman.com/blog/ASPNETMVCAndTheNewIIS7RewriteModule.aspx

this is also another good site about the redirect.
0
 
LVL 11

Expert Comment

by:mattibutt
Comment Utility
Why can't you install apache it will work without any issue or you don't have an option
0
 
LVL 9

Expert Comment

by:djpazza
Comment Utility
You need to install this rewrite module for iis7:

http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

0
 
LVL 7

Author Comment

by:MHenry
Comment Utility
sorry for the delay. and thanks for the links. just what I was looking for!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
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.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

743 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

17 Experts available now in Live!

Get 1:1 Help Now