I am using this .htaccess code for my website
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.website.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).website.com$ [NC]
RewriteRule ^$ /application/index.php [L]
This checks for subdomain other than www and displays content from directory /www/application
But the problem is for the first time it works correctly and displays the correct page but when i redirect internally/go to other page it loads the content from /www/
directory and not from /www/application/
directory.
And it also shows application
in the url parameter which i want to get rid of.
Ex : url = http://stackoverflow.website.com/application/user.php
I want it to be like url = http://stackoverflow.website.com/user.php
- but from application directory.
Need this for a SAAS Application.