• 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?

Viewing 1 replies (of 1 total)
  • Thread Starter meegwell

    (@meegwell)

    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]
    </IfModule>

    # END WordPress

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

Viewing 1 replies (of 1 total)
  • The topic ‘Added a script in the root but get a 404’ is closed to new replies.