Added a script in the root but get a 404 (2 posts)

  1. meegwell
    Posted 8 years ago #

    WP blog is located here: root/

    I added a directory script app here (not related to WP): root/directory/

    I was at first able to access the scripts admin panel at: root/directory/admin.php

    But when I refreshed it went to my blog's 404 page and I can no longer access any files that do exist under root/directory/*

    I just get a 404.

    Does this have anything to do with permalinks/mod rewrite? how do I avoid it?

  2. meegwell
    Posted 8 years ago #

    I've searched and found this issue to be very common. There was one solution that sort of makes sense - to add some lines of "allowable" subdirectories in .htaccess:

    # stuff to let through (ignore)
    RewriteCond %{REQUEST_URI} "/folder1/" [OR]
    RewriteCond %{REQUEST_URI} "/folder2/"
    RewriteRule (.*) $1 [L]

    Does this mean that my .htaccess should look like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} "/directory/"
    RewriteRule (.*) $1 [L]

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    ...or do I do it separate from the # WordPress section?

Topic Closed

This topic has been closed to new replies.

About this Topic