htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Help me hide a folder..
PostPosted: 18 Aug 2008 21:21 
Offline

Joined: 18 Aug 2008 21:17
Posts: 1
Hi,

I've set up a site of mine here, http://www.roadsout.com. I've set it up so that the main folder for the site is 'roadsout' which is a subfolder in the root folder.

I'm using this .htaccess to make this happen.

Code:
RewriteEngine on


Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} roadsout.com
RewriteCond %{REQUEST_URI} !roadsout/
RewriteRule ^(.*)$ roadsout/$1 [L]


RewriteCond %{HTTP_REFERER} !^http://www.roadsout.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.roadsout.com$      [NC]
RewriteRule .*\.(.*.*.*jpg|jpeg|gif|png|bmp)$ http://www.roadsout.com [R,NC]

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/roadsout.*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]




It works, but when I click on some links on my site, it starts showing the subfolder inside my site too, for example,

http://www.roadsout.com/roadsout/index. ... e&Itemid=1

Can you give me some .htaccess code that will permanently hide that folder from showing up in my site's links?

Why do I want to make a subfolder and run it like that? Because it makes it easier for me to manage my folders and doesn't make a mess of things. Plus I want to host other sites too, so each site will have it's own folder which will be easy to manage.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: MSN [Bot], MSNbot Media, Yahoo [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB