I would like to redirect all requests to: domain.com to a subfolder /sub, though i do not want that subfolder to show in url so that my url remains domain.com.
Is this possible at all ?
EDIT: After trying all of the suggestions i still get URL looking like domain.com/sub whenever i go to domain.com
Here is my current code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?sub.domain.com$
RewriteRule ^(/)?$ en [L]
RewriteCond %{HTTP_HOST} ^(www.)?sub.domain.fr$
RewriteRule ^(/)?$ fr [L]
My folder structure is:
/
->en
->fr
Try this in you htaccess file :
Edit :
Just to do some cleaning on your posted code, it should be :