By andrew235208
I have a standard Wordpress install on an Ubuntu 16.04 server using nginx.
Part of the DO tutorial for the Wordpress setup is to include this line:
try_files $uri $uri/ /index.php$is_args$args;
I need all requests to /admin/(.+) to avoid running through Wordpress’ index.php because the files here have nothing to do with Wordpress.
I’ve tried a standalone location /admin {…} block, if statements within location / {…} and nothing seems to work; /admin continually gets matched by the above try_files block/
Any insight as to how I need to set this up to exclude /admin and all subdirectories/files from being run through Wordpress?
Thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
To follow up here. The try_files directive used in this way should only redirect things through index.php when the requested file does not exist.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.