I have one domain say www.example.com, i want to host multiple sites in this domain. I put multiple sites in directories in root directory. so www.example.com points to root directory. i am using .htaccess to remove extensions from URL.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
the other sites are placed in htaccess/dir1, htaccess/dir2. I want to create rewrite rule for those two directories. If user enters www.example.com/dir1, he should be directed to http://ift.tt/2oC0j98, and all the links in dir1 pages should redirect to same dir1 e.g. http://ift.tt/2oIJs14 should be redirected to http://ift.tt/2oC4h1x. Same for dir2. Any help will be appreciated to achieve this.
Aucun commentaire:
Enregistrer un commentaire