Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ori's avatar
Level 4

Nginx redirect file to folder

Hi, I am migratin gold website from pure php to Laravel app. I want to keep url redirects for SEO.

I got address like mineral.php?number=1234 and I would like to get /mineral/1234

but when I use rewrite ^/mineral\.php\?cislo\=(.*)$ /mineral/$1 redirect; it does not work and visited url outputs No input file specified.

Could anyone help me how to solve that issue?

0 likes
1 reply

Please or to participate in this conversation.