Level 75
From nginx site: https://www.nginx.com/blog/converting-apache-to-nginx-rewrite-rules/
Here is a DO post https://www.digitalocean.com/community/questions/htaccess-config-to-nginx
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I need to define rule in my nginx server when I go site.com/play/gamename
it have css and js file and load url is site.com/play/gamename/script.js but script.js is in site.com/uploads/games/gamename/script.js and I want to load from this address
how can define this rule in nginx
I had this in my htaccess in previous apache server
RewriteCond %{REQUEST_URI} \.(jpg|png|css|js|appcache|xml|ogg|m4a)$
RewriteRule ^play/(.+) username/public/uploads/games/ [L]
Please or to participate in this conversation.