Friday, 19 October 2018

.htaccess - htaccess redirection for subdomain

Can someone please help me with this htaccess, I just want this subdomain wildcard http://subdomain.example.com/login -> redirected to this link http://www.example.com/login



RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.+).example.com\login [NC]
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/login/$1 [L,NC,QSA]

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...