Hi
I need help in writing clean urls for my drupal sites. My set up is like this.
I have many subsites under document root. for which I can enable clean url as follows
server {
listen 80;
server_name nginx ; # your domain name
client_max_body_size 50M;
root /var/www/drupal; # your drupal site files
charset utf8;
source_charset utf8;
access_log /var/log/nginx/localhost.access.log; # log file path
location / { ######################################## 1
root /var/www/drupal/; # your drupal site files
index index.php;
if (!-e $request_filename) {
rewrite ^/subsite/$ /subsite/ permanent;
rewrite ^/subsite/(.*)$ /subsite/index.php?q=$1 last;
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location /subsite1/ { ############################################ 2
root /var/www/drupal/;
index index.php;
if ($request_uri ~* ^.*/.*$) {
rewrite ^/(\w*)/(.*)$ /$1/index.php?q=$2 last;
break;
}
}
I want to combine rewrite urls for ###1 and ###2 and I have more than 15 subsites under subsite1. I dont want to add location directive { } for each and every subsite instead I want a rewrite rule which satisfies the clean urls in all the subsites under subsite1.
Thanks in advance.