Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Rewrite Help

$
0
0
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 (and am willing to pay for help if it's a complex thing)..

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.

So if anyone can help answer this I would be very happy.

Thank you very much, and I hope I can be contributing soon and not just asking questions.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>