I have a double slash in my URL (which is not ideal).
So my app is hit at //signup
.
Error message:
Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET //signin""
Anyway to change it to just /signup
?
I have tried the below in the first location block (which is the one catching the proxy).
Maybe something along the lines of the...
location /apps/phpauthentication/1 {
rewrite ^\//(.*)/$ /$1 break;
try_files $uri /app_dev.php$is_args$args;
if (!-e $request_filename) {
rewrite ^/(.*)$ /app_dev.php last;
}
}
Full config:
server {
listen 80;
server_name localhost;
root /srv/http/web;
index app_dev.php index.php index.html;
location /apps/phpauthentication/1 {
rewrite ^\//(.*)/$ /$uri permanent;
try_files $uri /app_dev.php$is_args$args;
if (!-e $request_filename) {
rewrite ^/(.*)$ /app_dev.php last;
}
}
location ~ ^/(app_dev|config)\.php(/|$) {
fastcgi_pass app:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_param APP_ENV dev;
include fastcgi_params;
}
location ~ \.php$ {
fastcgi_pass app:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param APP_ENV dev;
include fastcgi_params;
}
}
Thanks :)