Help with convert .htaccess to nginx

haonhien nginx-forum at nginx.us
Thu Apr 12 03:19:37 UTC 2012


It's me again :( I was trying to install siwapp on my webserver but I
couldn't make it work with nginx, here is the .htaccess file content:

    # If the file is NOT the index.php file
    <IfModule mod_rewrite.c>

     RewriteEngine on
     RewriteCond %{REQUEST_FILENAME} !index.php
     # Hide all PHP files so none can be accessed by HTTP
     RewriteRule (.*)\.php$ index.php/$1


     RewriteCond $1
!^(index\.php|nhototamsu|assets|cache|xd_receiver\.html|photo|ipanel|automap|xajax_js|files|robots\.txt|favicon\.ico|ione\.ico|(.*)\.xml|ror\.xml|tool|google6afb981101589049\.html|googlec0d38cf2adbc25bc\.html|widget|iradio_admin|services|wsdl)

     RewriteRule ^(.*)$ index.php/$1 [QSA,L]
     


</IfModule>


When I access
http://myurl.com/tin-tuc/tuyen-sinh/tu-van/2012/04/25757-phan-van-qua-giua-khoi-a1-va-khoi-a.html
,nginx could display the page correctly, it said: "404 Not Found" (new
URL:
http://myurl.com/tin-tuc/tuyen-sinh/tu-van/2012/04/25757-phan-van-qua-giua-khoi-a1-va-khoi-a.html)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,225195,225195#msg-225195



More information about the nginx mailing list