i have been struggling with this problem for sometime and desperately seek some kind of solution. i wish to hide two directories in the url in favor of their sub-directories.
example 1.
here is what i have:
default: root -> punbb -> forum -> files
url: http://example.com/punbb/index.php
here is what i want to accomplish:
rewrite: root -> forum -> files
url: http://example.com/forum/index.php
again with a different directory:
default: root -> wordpress -> blog -> files
http://example.com/wordpress/index.php
here is what i want to accomplish:
rewrite: root -> blog -> files
http://example.com/blog/index.php
so in conclusion i want to get rid of both punbb and wordpress in the url.
---
example 2.
in this example i successfully redirected a subdirectory (drupal) to the root (example.com).
default: root -> drupal -> files
http://example.com/drupal/index.php
rewrite: root -> files
http://example.com/index.php
code for example 2.(works like a charm)
RewriteRule ^$ drupal/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/$1 [L]
but nothing i have tried with example 1 works. help please.