views:

17

answers:

1

I installed drupal on my site at say, example.co.uk/portfolio.

All the links are showing as example.co.uk/portfolio/project-1.

I want it to be example.co.uk/project-1

How can I use rewrite rules or whatever so that wherever there is a link that has the /portfolio directory showing, that it will not show it in the href at all? I want to be able to hide that the site is installed in a directory and want it to show everything from the root url www.example.co.uk/

So far, I've messed around with RewriteBase / and also mapping the portfolio to the main root via:

RewriteRule ^/?$ /portfolio
A: 

Try this mod_rewrite rule in the .htaccess file in your root directory:

RewriteEngine on
RewriteRule !^portfolio/ portfolio%{REQUEST_URI}
Gumbo