I have WordPress installed on my root / of example.com and another Web app on /sub-directory/.
I have Nginx rewrite rule:
location / {
try_files $uri $uri/ /index.php?$args;
fastcgi_read_timeout 300;
}
location ~ .php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
rewrite ^/sub-directory/(.*).html$ http://www.example.com/sub-directory/filename.php?argument=$1;
Which gives me if I visit:
http://www.example.com/sub-directory/lorem-ipsum-text.html
The visit on URL from above redirects me to the thing I did not wanted, instad wanted "lorem-ipsum-text.html":
http://www.example.com/sub-directory/filename.php?argument=lorem-ipsum-text
Why caot I get it worked?
Thanks for help!
