简体   繁体   中英

Converting from .htaccess to web.config

I need help converting this .htaccess code to a web.config file. I've tried some of the online converters but they arent working. Is there a way to use a .htaccess on a Windows Azure server? - or if not, can someone help translate the code to web.config

Options -Indexes

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

</IfModule>

.htaccess file is not recognizible by Azure Web Sites. Azure Web Sites run on Microsoft IIS.

Trying taking a look at http://blog.syntaxc4.net/post/2012/07/19/getting-started-with-php-on-windows-azure-web-sites.aspx which will help you convert it properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM