jeudi 27 août 2015

Redirect .htacess to subdir but don't change URL

I've already searched a lot and no success. I have a host and 2 websites on it. Let's call as www/1 and www/2. if someone go to: 1.com I want to show www/1 but show URL 1.com and the same to 2.com as www/2

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+?)/?$ $1.html [L]
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]

Can someone please help?




Aucun commentaire:

Enregistrer un commentaire