I developed a credit card applicatoin on my small local using PHP, MySQL and Apache and contains b .htaccess file that contains this:
#Setting the default handler. DirectoryIndex home.do <IfModule mod_mime.c> #Supporting .do extensions AddType application/x-httpd-php .do </IfModule> <IfModule mod_rewrite.c> #Getting rid of .do file extension if required RewriteEngine on RewriteCond % !-d RewriteCond %.do -f RewriteRule ^(.*)$ $1.do </IfModule>
However I informed that my customer's web server is IIS and I must make use of a web.config file rather than .htaccess. Can anybody direct me through this, please?
This short article worth a glance:
Converting .htaccess Content to IIS web.config
This may be viewed as cheating, but we use ISAPI_Rewrite, which allows you simply make use of the .htaccess apply for IIS. If they come to use it the server, you will not have to translate anything.
Take note this is only going to focus on IIS7 and not on IIS6. Also this involves FastCGI to become setup and the URL Spinning module to become installed and enabled. They are things your hoster will have the ability to verify for you personally. If the suggestions above holds true then your following file should have the desired effect ( you will need to tweak the pathways however I believe your hoster will have the ability to do that for you personally should you supply all of them with this situation file.
<?xml version="1." encoding="UTF-8"?> <configuration> <configSections> <sectionGroup title="system.webServer"> <sectionGroup title="rewrite"> <section title="rewriteMaps" overrideModeDefault="Allow" /> <section title="rules" overrideModeDefault="Allow" /> </sectionGroup> </sectionGroup> </configSections> <system.webServer> <!-- Mapping the .do extension towards the PHP ISAPI module --> <handlers> <!-- the next lines are very specific for your host book the module title and also the scriptProcessor path using the system administrator! essentially this really is just like http://learn.iis.internet/page.aspx/246/using-fastcgi-to-host-php-programs-on-iis-70/#EnableFastCGI only insconfig format. --> <add title="MaskDoAsPHP" path=".do" verb="GET,Mind,Publish,DEBUG" modules="FastCgiModule" scriptProcessor="C:PHPphp-cgi.exe" /> </handlers> <!-- Setting the default handler. --> <defaultDocument> <files> <clear /> <add value="home.do" /> </files> </defaultDocument> <rewrite> <rules> <rule title="Getting rid of do extension" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions> <add input="" matchType="IsFile" ignoreCase="false" negate="true" /> <add input="" matchType="IsDirectory" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url=".do" appendQueryString="true" /> </rule> </rules> </rewrite> </system.webServer>