<div dir="ltr">Try<br><br>rewrite ^/report/$ /index.php?r=app%2Fform&id=2lyEsw last;<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пн, 6 сент. 2021 г. в 07:59, Jore <<a href="mailto:community@thoughtmaybe.com">community@thoughtmaybe.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi there,<br>
<br>
Is it possible to make a pretty URL for a specific PHP page?<br>
<br>
I'd like <a href="https://domain.com/report/" rel="noreferrer" target="_blank">https://domain.com/report/</a> to render<br>
<a href="https://domain.com/index.php?r=app%2Fform&id=2lyEsw" rel="noreferrer" target="_blank">https://domain.com/index.php?r=app%2Fform&id=2lyEsw</a><br>
<br>
So I tried this location block, but I get 403 forbidden:<br>
<br>
location /report {<br>
index index.php?r=app%2Fform&id=2lyEsw;<br>
alias /var/www/easyforms;<br>
}<br>
<br>
<br>
<br>
Here's my whole config:<br>
<br>
<br>
server {<br>
listen 443 ssl http2;<br>
server_name <a href="http://report.DOMAIN.COM" rel="noreferrer" target="_blank">report.DOMAIN.COM</a>;<br>
root /var/www/easyforms;<br>
gzip on;<br>
ssl_certificate /var/lib/acmesh/<a href="http://report.DOMAIN.COM/fullchain.cer" rel="noreferrer" target="_blank">report.DOMAIN.COM/fullchain.cer</a>;<br>
ssl_certificate_key<br>
/var/lib/acmesh/<a href="http://report.DOMAIN.COM/report.DOMAIN.COM.key" rel="noreferrer" target="_blank">report.DOMAIN.COM/report.DOMAIN.COM.key</a>;<br>
ssl_protocols TLSv1.2;<br>
ssl_prefer_server_ciphers on;<br>
ssl_ciphers<br>
'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES12$<br>
ssl_session_cache shared:SSL:5m;<br>
ssl_session_timeout 10m;<br>
<br>
location /report {<br>
index index.php?r=app%2Fform&id=2lyEsw;<br>
alias /var/www/easyforms;<br>
}<br>
<br>
location / {<br>
index index.php index.html;<br>
try_files $uri $uri/ /index.php?$args;<br>
}<br>
<br>
location ~ \.php$ {<br>
include fastcgi.conf;<br>
fastcgi_intercept_errors on;<br>
include fastcgi_params;<br>
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
fastcgi_pass unix:/run/php/php-fpm.sock;<br>
fastcgi_index index.php;<br>
fastcgi_read_timeout 300s;<br>
}<br>
}<br>
<br>
<br>
What am I doing wrong?<br>
<br>
Thanks!<br>
Jore<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div>