• I am trying to get wordpress to recognize an index.php file within a sub directory. No matter how I write my htaccess file (in either directory) I simply can not get WordPress to recognize it. Does anyone have any suggestions. I am going nuts. I have even tried simply deleting the htaccess files to no avail.

    File Structure
    Wordpress: /public_html
    Boxbilling: public_html/boxbilling

    My WP htaccess file is the standard default file generated with install
    Below is my Boxbill htaccess file

    Options -Indexes
    Options +FollowSymLinks
    
    RewriteEngine On
    
    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit <code>attempts</code>
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.
    
    ### re-direct to www
    #RewriteCond %{HTTP_HOST} ^yourdomain.com
    #RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
    
    # If you are receiving "Internal Server Error" message
    # Tune path if installing into subfolder, ie "RewriteBase /boxbilling/"
     RewriteBase /boxbill
    
    # This line is for Windows Environment when API is giving authorization error
    RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
    
    <FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|phtml|sql)$">
        Order Allow,Deny
        Deny from all
    </FilesMatch>
    
    <IfModule mod_headers.c>
        # MONTH
        <FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|swf)$">
           Header set Cache-Control "max-age=2592000"
        </FilesMatch>
    
        # WEEK
        <FilesMatch "\.(js|css|pdf|txt)$">
           Header set Cache-Control "max-age=604800"
        </FilesMatch>
    
        # DAY
        <FilesMatch "\.(html|htm)$">
           Header set Cache-Control "max-age=43200"
        </FilesMatch>
    </IfModule>
    • This topic was modified 6 years, 2 months ago by rlbunch37840.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Seeing that you haven’t received any replies regarding this issue I thought I might chime in with my opinion on a viable solution.

    I have done many WordPress + (other PHP software) integrations and I always installed WordPress in a subfolder and any other script in its own folder.

    Bottom line, I would recommend moving your WP installation to a subfolder. You can do this as painless as possible using the Duplicator plugin. Then proceed with the integration.

    Thread Starter rlbunch37840

    (@rlbunch37840)

    I changed directory, still did not fix the problem. I am starting to think my provider has a whacked hosting environment. I have tried every htaccess config I can think of.
    Last night it was working, spent several hours working setting it up then all of a sudden I get a 503 error and boxbilling stopped working completely

    Thread Starter rlbunch37840

    (@rlbunch37840)

    Ok very strange things going on.
    I changed my boxbill htaccess and included only “options- Indexes”
    client side worked fine but admin side wouldn’t. Reverted back to the old htaccess file and all is working again. This is the strangest occurrence I have ever seen. I am thinking this is a server isue… your thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Recognize non WordPress pages (subdirectory)’ is closed to new replies.