Welcome! Log In Create A New Profile

Advanced

Rewrite Help

Posted by cshop 
Rewrite Help
March 06, 2014 12:35PM
Hi there,

I'm a new NGINX user, and love it (mostly) so far.. the problem is converting my old apache rewrite to nginx.. i'm unable to make the following things work and need a hand.

I am using the YII framework with NGINX, and I have the YII bootstrap redirects in place and working.

Issue 1
we have a dev site and live site. i only want our ips to access the dev site. So any unauthorized ip should be directed to the live site, preferrably with a 301 redirect error so the search engines no longer index the dev site.

Issue 2
if i have a path like site/folder or site/folder/ i get a 404 error, for some reason the index.php or the index.html isn't being read at all, even though i have a location directive:

location /folder/ {
if (!-e $request_filename) {
rewrite ^(.*)$ /folder/index.php;
}

Issue 3
I'd like to redirect /account and /signup pages to https.

Please email admin at dns dot ac
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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