Widzę, że jest tutaj sporo napisane w tym temacie jednak po wielu próbach niestety nie udało mi się skonfigurować pliku .htaccess odpowiednio
Case wygląda tak że chciałbym przekierować swoją główną domenę podłączoną do konta na podkatalog. Korzystam z serwera na Hostmonster.com i tam znalazłem opis jak to zrobić jednak nie działa to rozwiązanie do końca tak jak powinno.
http://helpdesk.hostmonster.com/index.php/kb/article/000347
Kod
# Hostmonster.com
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change yourdomain.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change yourdomain.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
RewriteRule ^(/)?$ subdirectory/index.php [L]
# .htaccess main domain to subdirectory redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change yourdomain.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/subdirectory/
# Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'subdirectory' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /subdirectory/$1
# Change yourdomain.com to be your main domain again.
# Change 'subdirectory' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$
RewriteRule ^(/)?$ subdirectory/index.php [L]
To rozwiązanie dobrze przekierowuje wejście z przykładowej strony www.yourmaindomain.com na katalog subdirectory jednak każdy link na mojej stronie wygląda tak: www.yourmaindomain.com/subdirectory/.../index.php zamiast www.yourmaindomain.com/.../index.php.
Niestety nie wiem jak korzystając z poleceń zapisywanych w pliku .htaccess sprawić aby przekierowanie na podkatalog nie było widoczne dla odwiedzającego.
i przy okazji dla mistrzów sztuki

Z góry dziękuje serdecznie za pomoc.
Paweł