Gena Makhomed Wrote: ------------------------------------------------------- > On 20.06.2010 14:06, WisdomFusion wrote: > > >> - rewrite ^.*$ > http://www2.example.com/thread-$tid-1-1.html > permanent; > >> + rewrite ^ > http://www2.example.com/thread-$tid-1-1.html? > permanent; > > >> - rewrite ^(.*) http://www2.example.com$1 > permby WisdomFusion - Nginx Mailing List - English
Gena Makhomed Wrote: ------------------------------------------------------- > On 19.06.2010 16:53, WisdomFusion wrote: > > > #rewrite dynamic url with querystrings > > if ($args ~* "boardid=[0-9]+&id=([0-9]+)") { > > set $tid $1; > > rewrite ^.*$ > http://www2.example.com/thread-$tid-1-1.html > permanent; > > - rewrite ^.*by WisdomFusion - Nginx Mailing List - English
Hi, all I recently migrates my web server from lighty to nginx(nginx/0.7.67 + php-fpm), but there is something strange with the nginx rewrite rule. The problem is, I wanna direct rules like this, http://www1.example.com/dispbbs.asp?boardID=15&ID=164752 to a new domain(www2) and new format as follows, http://www2.example.com/thread-164752-1-1.html However, I gets some straby WisdomFusion - Nginx Mailing List - English
Hi, all Recently, I altered my web server lighty to nginx. And now, Struggling with some problems. First, I have a site in nginx which only rewrites urls and redircts them to a new domain, and this site has exactly no file in its root directory. I put some rewrite rules (just string rules, no querystring) in my nginx.conf list 1 rewrite ^/index_([0-9]+)(.*)$ /forum-$1-1.html last; rewrby WisdomFusion - Nginx Mailing List - English
Jim Ohlstein Wrote: ------------------------------------------------------- > Most nginx rewrites will begin with a caret (^). > Also, generally, quotes are not necessary unless > you are using curly braces as they have special > meaning in nginx configuration files. > > For the first line try > > rewrite ^/index\.asp /index.php last; > > and so on. Iby WisdomFusion - Migration from Other Servers
Rob Schultz Wrote: ------------------------------------------------------- > Hi Gavin, > > > I have some problem with my nginx > > I just could not restrict files in certain > floder, as follows, i put the settings to > nginx.conf > > > > location ~ ^/restrict/ > > { > > auth_basic "STATISTIC"; > >by WisdomFusion - Nginx Mailing List - English
i have add $ to each rule, however, it does not work either.... rewrite ^/dispbbs\.asp\?boardID=([0-9]+)&ID=([0-9]+).*$ /thread-$2-1-1.html last; rewrite ^/dispbbs\.asp\?(.*)&id=([0-9]+)(.*)$ /thread-$2-1-1.html last; rewrite ^/index\.asp\?boardid=([0-9]+)(.*)$ /forum-$1-1.html last; rewrite ^/index\.asp\?boardid=([0-9]+)$ /forum-$1-1.html last; rewrite ^/index\.asp$ /index.php laby WisdomFusion - Migration from Other Servers
BTW, I should read tips in http://nginx.org/en/docs/http/request_processing.html#simple_php_site_configuration first. Thanks again. :)by WisdomFusion - Nginx Mailing List - English
Hi, Rob Great thanks for your quick reply. I have tried your suggestion out, and add the following config: location ~ ^/restrict/ { auth_basic "STATISTIC"; auth_basic_user_file /usr/local/nginx/conf/pwfornginx } location ~ ^/restrict/.*\.php$ { auth_basic "STATISTIC"; auth_basic_user_file /usr/by WisdomFusion - Nginx Mailing List - English
thx for ur quick reply, i have try your advice, rewrite ^/dispbbs_([0-9]+)_([0-9]+)_([0-9]+)_skin([0-9]+)_([0-9]+)_([0-9]+)\.html$ /thread-$3-1-1.html last; rewrite ^/dispbbs_([0-9]+)_([0-9]+)_([0-9]+)_skin([0-9]+)_([0-9]+)\.html$ /thread-$3-1-1.html last; rewrite ^/dispbbs_([0-9]+)_([0-9]+)_([0-9]+)_skin([0-9]+)\.html$ /thread-$3-1-1.html last; rewrite ^/dispbbs_([0-9]+)_([0-9]+)_([0-9by WisdomFusion - Migration from Other Servers
Hi, all I have some problem with my nginx I just could not restrict files in certain floder, as follows, i put the settings to nginx.conf location ~ ^/restrict/ { auth_basic "STATISTIC"; auth_basic_user_file /usr/local/nginx/conf/pwfornginx } the folder /restrict/ is restricted perfect, however, files in the folder can still be accessby WisdomFusion - Nginx Mailing List - English
Hi, all Last night, I had changed my webserver form lighty to nginx, the following code is the rewrite rules in lighttpd.conf: url.rewrite = ( "/index\.asp" => "/index.php", "/index\.asp\?boardid=([0-9]+)$" => "/forum-$1-1.html", "/index\.asp\?boardid=([0-9]+)(.*)$"by WisdomFusion - Migration from Other Servers