Rewrite nginx url specific location url with PHP -


i'm trying rewrite location https.

however want @ specific location: http://test.org/forums/dfjk34dkk25cm369aa135cs56v34/

i want php files in directory redirected https.

my current attempt hasn't worked out. have done wrong?

location ~ /forums/dfjk34dkk25cm369aa135cs56v34\.php(/|$) {      return 301 https://$host$request_uri;  } 

this did trick.

location ~ ^/forums/dfjk34dkk25cm369aa135cs56v34/.*php(/|$) {   return 301 https://$host$request_uri; } 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -