Reputation: 93
My .htaccess file is all working in localhost. Did I make the site live then there htaccess is not working. And my live server is Windows server not the linux server
I have used this site for htaccess to web config converter htaccess to webconfig link
.htacess code
RewriteEngine on
RewriteRule ^index.html$ index.php [NC,QSA]
RewriteRule ^enquiry.html$ enquiry.php [NC,QSA]
Web Config Code
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<rule name="rule 1o">
<match url="^index.html$" ignoreCase="true" />
<action type="Rewrite" url="/index.php" appendQueryString="true" />
</rule>
<rule name="rule 2o">
<match url="^enquiry.html$" ignoreCase="true" />
<action type="Rewrite" url="enquiry.php" appendQueryString="true" />
</rule>
</system.web>
</configuration>
Upvotes: 0
Views: 1061
Reputation: 93
I have own solve this Bcoz my the IIS 7 is helping me for this and
Your can use the config and rewrite and all rule set in the rules then you got the answer for htaccess is working in webconfig
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="MyRule">
<match url="index.html" />
<action type="Rewrite" url="/index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Upvotes: 1