Translating an Apache .htaccess file to an IIS web.config

2012-09-11   来源:站长日记       编辑:沧海桑田   类别:服务器    转载到:    发表评论

I developed an application on my local using PHP, MySQL and Apache and it has a .htaccess file containing this:

Options +FollowSymlinks
Options -Indexes


#Setting the default handler.
  DirectoryIndex home.do


  #Supporting .do extensions   
     AddType application/x-httpd-php .do



  #Removing .do file extension if necessary
     RewriteEngine on
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteCond %{REQUEST_FILENAME}.do -f
     RewriteRule ^(.*)$ $1.do


But I informed that my customer's web server is IIS and I have to use a web.config file instead of .htaccess. Can anyone direct me through this, please?


   
       
           
               

               

       
   



   
   
       
       
   


   
   
       
           
           
       

   


   
       
           
               
               
                   
                   
               

               
           

       

   





Options +FollowSymlinks
Options -Indexes

Order deny,allow
Deny from all

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


























0

0
0|0 | 鲜花 VS 砸蛋 | 81阅读 0评论