Welcome Guest, Not a member yet? Register   Sign In
.htaccess with subfolder as root
#11

[eluser]elaniobro[/eluser]
Thanks, sorry I didn't mention earlier, but I did see that '?' connundrum.

I did try with:
Code:
RewriteEngine On
    #RewriteBase /
    RewriteBase /5
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php? [L]
    #RewriteRule ^(.*)$ /index.php/$1 [L]

but to no avail...
#12

[eluser]elaniobro[/eluser]
Ok, so I forgot to upload the config.php file. My apologies for jumping the gun. However, I came up with a quasi solution.

www.mysite.com/.htaccess
Code:
Options +FollowSymLinks
RewriteEngine On
AddType x-mapp-php5 .php

    
#declares the base from which to start the rewrite
    RewriteBase /

#sets the folder in which to make the 'base'
    RewriteCond %{REQUEST_URI}  !(thoughts)
    RewriteRule ^thoughts/(.*)$ thoughts/$1/ [L]

#allows direct access to this directory
    RewriteCond %{REQUEST_URI}  !(staging/0)
    RewriteRule ^staging/(.*)$ staging/0/$1/ [L]

    
#sets the conditions.
    RewriteCond %{REQUEST_URI}  ^/*
    RewriteCond %{REQUEST_URI}  !(0|1|2|5|staging/0|thoughts|dev)
    RewriteRule ^(.*)$ thoughts/$1 [L,NC]

and in

www.mysite.com/5/.htaccess
Code:
RewriteEngine On
    #RewriteBase /
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    #RewriteRule ^(.*)$ /index.php/$1 [L]

This appears to work, at first I thought it didn't because /5/ was still in the URL, then I realized that is because the base_url had mysite.com/5/ set, once that removed it all worked like a charm..well sorta.. Had to do some re-linking Tongue

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB