Welcome! Log In Create A New Profile

Advanced

Re: Help with convert .htaccess to nginx :(

Edho Arief
October 27, 2011 11:36PM
On Fri, Oct 28, 2011 at 10:26 AM, Giang <nginx-forum@nginx.us> wrote:
> Hi guys,
>
> 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:
>
> Options +FollowSymLinks +ExecCGI
>
> AddDefaultCharset utf-8
>
> <IfModule mod_authz_host.c>
>  <FilesMatch "\.(lock|conf)$">
>    Order deny,allow
>    Deny  from all
>  </FilesMatch>
>

location ~ \.(lock|conf)$ { deny all; }

>  <FilesMatch "pre_.+\.php">
>    Order deny,allow
>    Deny  from all
>  </FilesMatch>
> </IfModule>
>

location ~ pre_.+\.php$ { deny all; }

>
> <IfModule mod_rewrite.c>
>  RewriteEngine On
>
>  # uncomment the following line, if you are having trouble
>  # getting no_script_name to work
>  #RewriteBase /
>
>  # we skip all files with .something
>  RewriteCond %{REQUEST_URI} \..+$
>  RewriteCond %{REQUEST_URI} !\.html$
>  RewriteRule .* - [L]
>
>  # we check if the .html version is here (caching)
>  RewriteRule ^$ index.html [QSA]
>  RewriteRule ^([^.]+)$ $1.html [QSA]
>  RewriteCond %{REQUEST_FILENAME} !-f
>
>  # no, so we redirect to our front web controller
>  RewriteRule ^(.*)$ index.php [QSA,L]
> </IfModule>
>

location ~ /[^.]+$ {
try_files $uri $uri/ $uri.html /index.php;
}



--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Help with convert .htaccess to nginx :(

Giang October 27, 2011 11:26PM

Re: Help with convert .htaccess to nginx :(

Edho Arief October 27, 2011 11:36PM

Re: Help with convert .htaccess to nginx :(

Edho Arief October 27, 2011 11:38PM

Re: Help with convert .htaccess to nginx :(

Giang October 27, 2011 11:58PM

Re: Help with convert .htaccess to nginx :(

makononov March 21, 2012 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 315
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready