• Hello All,

    I used to have some subfolders on my website. Once I installed wordpress on the main page however, those subfolders have stopped working, and entering the url (https://www.mysite.com/mysubfolder) results in a 404 (even though the /var/www/html/mysubfolder directory still exists).

    Any pointers on how to keep the non-wordpress subfolders working?

    thanks!

    Apache on CentOS

Viewing 10 replies - 1 through 10 (of 10 total)
  • What might help in debugging your situation is to post…

    1) .htaccess in your root install directory

    2) .htaccess in your mysubfolder directory

    3) machine’s Web server conf file, like /etc/apache2/apache2.conf

    4) site’s conf file, like /etc/apache2/sites-enabled/mysite.com.conf

    Also post your site’s real URL, so people can look at server headers to see if anything’s amiss there.

    Thread Starter jujubee

    (@jujubee)

    Hi David,

    Thanks. So, a small correction to my original post. I installed wordpress to a virtualhost directory, with the intention that it would just be active on that subdomain (https://subdomain.website.org). Here is the layout:

    • WordPress installed in /home/username/html
    • Virtualhost username.website.org points to /home/username/html in the httpd.conf file
    • No .htaccess in root directory (/var/www/html)
    • Contents of httpd.conf here: https://pastebin.com/3rKZ7EG1
    • No site conf file
    • Would prefer not to post site here, but can PM it to you?

    contents of /home/username/html/.htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Getting rid of /home/username/html/.htaccess and restarting apache doesn’t seem to change things.

    Thanks very much for any help you can offer!

    Thread Starter jujubee

    (@jujubee)

    Anyone with any thoughts? Help greatly appreciated!

    You pastebin file is expired.

    Thread Starter jujubee

    (@jujubee)

    sorry bout that… here’s a new pastebin upload for httpd conf file: https://pastebin.com/dKJWgqNQ

    Seems best if you engage someone (hire) them to assist you.

    Neither https://subdomain.website.org/ or https://website.org/ is running WordPress.

    Likely you require ssh to look at your log files + use inotifywait to camp on your root level directory, to ensure all file accesses are working as expected.

    Thread Starter jujubee

    (@jujubee)

    Hi David,

    Thanks for your reply. I used “website.org” as a standin for the actual site name (I’d prefer not to publish config details of my site to a public forum). I’ve put the details of the actual site name here: https://pastebin.com/85FjDPmT . It’ll expire in a week. Thanks, and sorry for the trouble. Really appreciate your attention.

    Which files do you think I should watch with inotifywait?

    Watch your root directory using inotifywait + verify correct files are accessed for your main site + subhost site.

    You can also watch your Apache error + access log simultaneously with multitail for additional information.

    If you require more assistance, likely best for you to hire someone to straighten this out.

    Another consideration is nested WordPress installs add complexity. Backups are complicated. Also caching between nested installs can sometimes interact.

    A good approach is to separate your sites into separate directory hierarchies.

    My layout takes the form of /sites/$client/$site/{wordpress,socialengine,htdocs} depending on type of site being served.

    A simple rearrangement of your content into separate directory hierarchies may resolve your situation also.

    Be sure to update your WP core + plugins, as you’re running hackable code right now, on your main site.

    Same with your subhost, which has same hackable core + plugins running.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to retain non-wordpress subfolders’ is closed to new replies.