This is a rewrite question, but it doesn't seem to be an issue with rewrites themselves--I've done all I can to try and research those. I'm moving a website from a PHP-based structure to Ghost, and I'm trying to redirect URLS in the form of example.com/blog/blog.php?postid=28
to example.com/post-title-here/
. However, whenever I try to access the first URL to test a rewrite solution, it only adds a slash immediately before the ?
and then proceeds to give me a 404. I've noticed it does this without any location
-based rules. Is this what's preventing any rewrite solution from working? If so, how do I stop it from doing so?
example.com.conf
:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:2368;
proxy_set_header Host $host;
}
}