I have setup a completely free website with x10hosting and freenom (.ml). In this website I have an account subdomain that uses the contents of the /account/ directory in the public_html directory.
It all works fine, but when http://account.lynk.ml/login gets rewritten, it rewrites to http://www.account.lynk.ml/home/MYUSERNAME/public_html/account/login.php.
Is there anyway to make it have the url http://account.lynk.ml/login? Thanks in advance.
Subdomain code in htaccess:
# Account subdomain
RewriteCond %{HTTP_HOST} ^account\.lynk\.ml$
RewriteCond %{REQUEST_URI} !^/account/
RewriteRule (.*) /account/$1
I am new to subdomains, so don't expect much knowledge from me. ;)
Something such as the following should be what you might be looking for; It essentially will rewrite anything from
subdomain.example.comorsubdomain.example.com/accountto/login:This leaves the content in
/accountand makes the url appear as/login