Hello, i have some problems with rewrite in nginx:
i`ll try explain the problem:
my site have rewrite rules like this:
http://domain/index.php?p=page1
http://domain/index.php?p=page2
etc.
after rewrite:
[code]
rewrite ^/([a-zA-Z_0-9\-]+)/?$ /index.php?p=$1 last;
[/code]
http://domain/page1/
http://domain/page2/
etc.
Every thing works fine until now when i make a forum in http://domain/forum/
when i browse to http://domian/forum/index.php it's work
but when i browse http://domain/forum/
not work.
and also i do not need rewrite rules in forum directory
here is my all rewrite rules:
[code]
rewrite ^/?$ /index.php last;
rewrite ^/forum/([a-z]=.*) /forum/index.php?$1 last;
rewrite ^/news,1,([0-9]+).htm?$ /index.php?p=news&area=1&id=$1 last;
rewrite ^/newsarchiv,([0-9]+),1.htm?$ /index.php?p=category&area=1&catid=$1 last;
rewrite ^/newsfrom/([0-9]+)?$ /index.php?p=category&area=1&catid=$1 last;
rewrite ^/newsfrom/([0-9]+)/?$ /index.php?p=category&area=1&catid=$1 last;
rewrite ^/newsfor/([0-9]+)/?$ /index.php?p=category&area=1&date=$1 last;
rewrite ^/newsfor/([0-9]+)?$ /index.php?p=category&area=1&date=$1 last;
rewrite ^/news/([0-9]+)?$ /index.php?p=news&area=1&id=$1 last;
rewrite ^/news/([0-9]+)/?$ /index.php?p=news&area=1&id=$1 last;
rewrite ^/category/([0-9]+)/page([0-9]+)?$ /index.php?p=category&area=1&catid=$1&page=$2 last;
rewrite ^/category/date([0-9]+)/page([0-9]+)?$ /index.php?p=category&area=1&date=$1&page=$2 last;
rewrite ^/([a-zA-Z_0-9\-]+)/?$ /index.php?p=$1 last;
rewrite ^/([a-zA-Z_0-9\-]+)?$ /index.php?p=$1 last;
rewrite ^/static-([a-zA-Z_0-9\-]+)-1.html?$ /index.php?p=$1 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([0-9\-]+)/page([0-9]+)?$ /index.php?p=$1&id=$2&page=$3 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([0-9\-]+)/page([0-9]+)/?$ /index.php?p=$1&id=$2&page=$3 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([0-9]+)?$ /index.php?p=$1&id=$2 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([0-9]+)/?$ /index.php?p=$1&id=$2 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([a-zA-Z_0-9\-]+)?$ /index.php?p=$1&id=$2 last;
rewrite ^/([a-zA-Z_0-9\-]+)/([a-zA-Z_0-9\-]+)/?$ /index.php?p=$1&id=$2 last;
rewrite ^/rss/?rss=news&toid=([0-9]+)?$ /rss/index.php?rss=news&toid=$1 last;
rewrite ^/rss/?$ /rss/index.php last;
rewrite ^/rss/news/([0-9]+)/1.htm?$ /rss/index.php?rss=news&toid=$1 last;
rewrite ^/rss/news/([a-zA-Z_0-9\-]+)/([0-9]+)/1.htm?$ /rss/index.php?rss=news&categ=$1&toid=$2 last;
if ( !-e $request_filename ) {
rewrite ^ /index.php permanent;
}
[/code]
i just want create directory forum and i want install a forum in it.
Please i really need some expert advice. Thank you.