I have an email verification script that looks like this:
http://example.com/v/index.php?t=TOKEN_EMAILED_TO_CLIENT
And I want it to look like this:
http://example.com/v/TOKEN_EMAILED_TO_CLIENT
Essentially just removing the index.php?t=
portion of the URL, but still allowing the index.php file to process the token.
I have tried the following three settings and none of them have worked:
location /v/ {
try_files index.php$args;
}
The above results in a failed nginx.conf file
location ^~ /v/ {
try_files /v/index.php?q=$uri;
}
The above results in a failed nginx.conf file
location ^~ /v/ {
rewrite ^/v/index.php?q=(.*)$ $1 permanent;
}
The above passes nginx.conf file requirements, but still does not do what I would like. It shows a 404 error when visiting http://example.com/v/TOKEN_EMAILED_TO_CLIENT
Any help would be greatly appreciated.