URL Rewrite with PHP on Windows IIS
Unfortunately I don't have access开发者_运维技巧 to the Windows Server in question, so I would need instructions as to how I could do this so I can pass it on.
Basically, I am using PHP on a Windows IIS 6 and I need to be able to rewrite the URLs as you would with a .htaccess file.
I need to turn
example.com/index.php?page=about
into
example.com/about/
Any ideas?
Many thanks
If you do not have access to the IIS server itself, then you are out of luck.
If you can convince the server operators to install an URL rewriting engine, like Ionic's Isapi Rewrite Filter or Helicon's ISAPI/Rewrite for example, then you can use regular .htaccess
files just like you would with Apache and mod_rewrite.
You can use the this plugin to IIS, as using regex.
IIS URL Rewrite 2.0 enables Web administrators to create powerful rules to implement URLs that are easier for users to remember and easier for search engines to find. By using rule
templates, rewrite maps, .NET providers, and other functionality integrated into IIS Manager, Web administrators can easily set up rules to define URL rewriting behavior based on HTTP headers, HTTP response or request headers, IIS server variables, and even complex
programmatic rules. In addition, Web administrators can perform
redirects, send custom responses, or stop HTTP requests
Here it explains how to use it.
精彩评论