Setup NGINX server config, allowing WordPress to handle static URL requests

Hello, I am working on a WordPress project project with an NGINX server, hosted by I've setup a clean test environment with no extra plugins.

[login to view URL]

My goal:

Is to re-map my uploaded media file (jpg, mv4) URLs the same way WordPress uses permalinks for WordPress page URLs. For example, without actually moving the file, I want this uploaded jpg with actual URL:

[login to view URL]

to also be called with this "pretty" URL request using the /media/ permalink directory:

[login to view URL]


While I'm trying to use the code snippet, linked just below, the NGINX server is intercepting before the URL request is even getting to Wordpress. Instead, I get a NGINX 404 error message page.

What I have tried:

Since static URL files were not reaching WordPress, I asked my hosting provider to add this rule into my NGINX config file:

error_page 404 /[login to view URL];

That didn't seem to work so I asked them to try:

error_page 404 =200 /[login to view URL];

This code is currently in place, if you are looking at the examples above. This seems to direct static URL requests to WordPress's 404 page but the outcome is not what was expected because, I think, NGINX bug - $wp->request parameter (obtained from $_SERVER['REQUEST_URI'] global) always indicates [login to view URL] file: [login to view URL]

More information:

Firstly, I am no NGINX developer. I do not have direct access to the NGINX config file but the server admins will make requested changes for me. Maybe something like the solution posted on this page is a close solution to my issue: [login to view URL]


WordPress code snippet, will be used once NGINX issue is resolved: [login to view URL]

Taidot: Apache, Linux, Nginx, PHP, WordPress

Näytä lisää: digitalocean nginx reverse proxy, nginx reverse proxy ssl, nginx proxy_pass example, nginx tutorial pdf, nginx reverse proxy to another server, nginx reverse proxy ubuntu, nginx tutorial, nginx reverse proxy windows, know php server config, ubuntu server config samba, windows media stream server config, find server config file, dedicated server config, game hosting server config, unreal irc server config file, smartfox server config file, premade openvpn server config, server config till game hosting, linux server config, darwin streaming server config

Tietoa työnantajasta:
( 0 arvostelua ) Brooklyn, United States

Projektin tunnus: #17853930

Myönnetty käyttäjälle:


Hello from Greece, Do you have SSH access to the server? Would you like to have a chat? Regards, Dimitris

$155 USD 3 päivässä
(428 Arvostelua)

5 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön


Hi Sir, Hope you are doing well, I am from Best 3 tier Data Center Organization designated as Cloud & Linux Expert, I have more than 8 years experience in Linux Servers Setup, Configuration, Security, Web hosting, Data Lisää

$100 USD 1 päivässä
(271 arvostelua)

Hi I have 5 year experience I can show you my precious work. I'm Individual freelancer I have no timing issue I can do work any time day/nights. so can we discuss once thanks.

$111 USD 2 päivässä
(99 arvostelua)

Hello, I'm an independent web & app Developer . My Best goal is to create a product that is modern, user friendly and secure. My specialties: - Role modern and custom website designs - Role Mobile and tablet frien Lisää

$155 USD 3 päivässä
(27 arvostelua)

Thank you for posting a Job. I WILL DO THIS AS PER YOUR REQUIREMENT AND EXPECTATIONS. With the experience of over 300+web development projects including ANDROID, IOS, WEBSITES, WEB APPLICATIONS AND SOFTWARE Lisää

$155 USD 3 päivässä
(12 arvostelua)