Welcome! Log In Create A New Profile

Advanced

Re: Very Simple htaccess rule

Daniele Melosi
March 17, 2011 05:08PM
try this:

location / {
try_files $request_uri $request_uri/ site$request_uri site/index.php;
}

Note: You shold define the php location in order to serve php page.

Il 17/03/2011 11:03, michaelvv ha scritto:
> Hi Nginx.
>
> Properly so simple you may laugh , but this world save my day :-)
>
> RewriteEngine On
>
> RewriteBase /
>
> RewriteCond %{SCRIPT_FILENAME} !-f
> RewriteCond %{SCRIPT_FILENAME} !-d
> RewriteRule ^(.*)$ site/$1 [NC,L,QSA]
> RewriteRule ^$ site/index.php [NC,L,QSA]
>
> When you hit the domain.com i simple need to access domain.com/site/index.php.
>
> After this info , i would like to study the rules more intense.
> But i'm in a shortage of time right now.
>
> Thanks In advance..
>
> /Michael
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,183435,183435#msg-183435
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


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

Very Simple htaccess rule

michaelvv March 17, 2011 06:03AM

Re: Very Simple htaccess rule

Daniele Melosi March 17, 2011 05:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
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