I cant access my folder on the root cauz of .htacess (AnyHelp)

Hi

I’ve installed affiliate system on a folder called affiliates ( http://www.marketiano.net/affiliates)

but i cant access it now from the browser.

i have wpmu installed in a folder (www.marketiano.net/wp) BUT its working from (www.marketiano.net) (the index is in the root)

after installing the affiliates, i cant access it from the browser, it gives me wrong url from the WORDPRESS.

in attached the .htaccess of both folders (Home & Affiliates)

  • Tom Eagles
    • Syntax Hero

    @samerdaif

    Hey thanks for joining our live chat, sorry the .htaccess changes didn’t fix the problem, i am tagging @aecnu our server guru on this,

    Adding some notes here for him.

    Hey Joe, tried moha’s suggestion didn’t work.

    Tried the following:

    RewriteCond %{REQUEST_URI} !^/affiliates

    # rest of WordPress rewrite rules

    also this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/affiliates/(.*)$
    RewriteRule ^.*$ - [L]
    </IfModule>

    Hope this saves a bit of ya time trouble shooting, basically he has his wp installed in a subfolder siteroot/wp and when trying to reach the siteroot/affiliates folder he is getting a 404 page not found in wordpress so even adding the rule above the wp entries isn’t working as it still searches the wp folder for the affiliates subfolder.

    Cheers

    Tom

    p.s. went through this as well.

    http://wordpress.stackexchange.com/questions/20152/cannot-access-non-wordpress-subdirectories-as-wordpress-overrides-them-with-a-40

  • aecnu
    • WP Unicorn

    Greetings samerdaif,

    Chiming in at Toms request and lets start form the beginning with the WordPress native rewrite rules which should look like this if it is a MultiSite:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*.php)$ $1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    Now with the addition that Moha suggested above it should look like this:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(affiliates.*) affiliates/$1 [L]
    RewriteRule ^(.*.php)$ $1 [L]
    RewriteRule . index.php [L]

    # END WordPress

    Please advise if that indeed does the job for us.

    Cheers, Joe

  • Smaiode
    • Flash Drive

    Hi aecnu and Tom,

    Thank you very much for your great support

    Now Jrox Has changed the root htaccess and have put this new one as shown here,

    but i cant access my network control panel

    http://marketiano.net/wp-admin/network/users.php

    it gives me the same error as was happening with affiliates folder

    DirectoryIndex index.php
    #Options -Indexes

    <ifModule mod_rewrite.c>
    RewriteEngine On

    # Some accounts require the RewriteBase to be set
    #RewriteBase /

    # Rewrite rule for replicated webpages
    # RewriteRule ^r/(.+)$ jrox.php?rep=$1

    RewriteCond %{REQUEST_URI} ^/system.*
    RewriteRule ^(.*)$ index.php?/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)$ index.php?/$1 [L]
    </ifModule>

    <ifModule mod_deflate.c>
    # compress text, html, javascript, css, xml:
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript

    # Or, compress certain file types by extension:

    <filesMatch ".(js|css|html)$">
    SetOutputFilter DEFLATE
    </filesMatch>
    </IfModule>

    <IfModule mod_expires.c>
    # Activate mod_expires for this directory
    ExpiresActive on

    # locally cache common image types for 7 days
    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/jpeg "access plus 2592000 seconds"
    ExpiresByType image/png "access plus 2592000 seconds"
    ExpiresByType image/gif "access plus 2592000 seconds"

    # cache CSS files for 24 hours
    ExpiresByType text/css "access plus 24 hours"
    </IfModule>

  • Smaiode
    • Flash Drive

    Thank you tom, you were really one of the most helpful guy i ever met, trying to do all of his best to just help, So Thank you very much :slight_smile:

    and thank you aecnu and moha for trying to help me too, it was nice from you

    here is what The Application provider changed in the htaccess which made it all work

    DirectoryIndex index.php

    #Options -Indexes

    <ifModule mod_rewrite.c>

    RewriteEngine On

    # Some accounts require the RewriteBase to be set

    #RewriteBase /

    RewriteRule ^(wp-(content|admin|includes).*) wp/$1 [L]

    # Rewrite rule for replicated webpages

    # RewriteRule ^r/(.+)$ jrox.php?rep=$1

    RewriteCond %{REQUEST_URI} ^/system.*

    RewriteRule ^(.*)$ index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.+)$ index.php?/$1 [L]

    </ifModule>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.