htaccess hide subdirectories in ALL pages

So i have changed my htaccess file to hide my subdirectory in the main url but any requests to other pages, they return in the url with the subdirectory now listed.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^my_site.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.my_site.com$
RewriteCond %{REQUEST_URI} !2013/
RewriteRule (.*) /2013/$1 [L]
</IfModule>

# END WordPress

So when i go to www.my_site.com the subdirectory is hidden as it should. But if i hit another page through my sites navigation the url will now show the subdirectory in the URL.

Read More

Is there any way to hide that directory in ALL situations?

Related posts

Leave a Reply