location ^/verify/(.*)$ {
try_files /verify.php?key=$1 =404;
}
# or
rewrite ^/verify/(.*)$ /verify.php?key=$1 last;
Pretty PHP URLs with nginx (Ubuntu)
-
26-06-2022 - |
문제
I am having a lot of difficulty configuring nginx pretty URLs with PHP. I am trying to rewrite /verify/codehere (code example: dsifoj24234j) to verify.php?key=codehere
Here is my current configuration:
location ^/verify/(.*)$ {
/verify.php?key=$1 last;
}
location / {
try_files $uri $uri/ /index.php;
}
.. It's not working, which brings me here. How can I fix it?
올바른 솔루션이 없습니다
다른 팁
제휴하지 않습니다 StackOverflow