WordPress.org

Ready to get started?Download WordPress

Forums

How to re-write file paths for WordPress installed in a sub-directory (1 post)

  1. dugost
    Member
    Posted 1 year ago #

    I've tried searching for a solution but maybe I haven't been using the correct terms. I have a site installed in a sub-directory, as recommended for a slight increase in security, so I have the URL re-written to hide that sub-directory:

    website.com/biglongdirectoryname/
    to
    website.com/

    This works great but the only issue that has come up is how file paths appear in URLs for files. My client will post a PDF to the site and wants to include the download URL in an email, brochure, etc. Problem is, the /biglongdirectoryname/ appears in the file path in the URL.

    It makes for unnecessarily long and unsightly links, not to mention the sub-directory wording is a ridiculous combination of random words so it looks weird and unprofessional too.

    Is there a way to change the file paths so that URLs for uploaded files don't contain that sub-directory, just like the site's permalinks are set up?

    Thanks in advance for any help.

Topic Closed

This topic has been closed to new replies.

About this Topic