I really tried tons of methods but i'm not successful. I want a .Htaccess code to do the following :
I want to rename this : http://www.mydomain.com/media --> http://media.mydomain.com
So, By example instead of calling this : http://www.mydomain.com/media/XXX/picture.jpg i will call : http://media.mydomain.com/XXX/picture.jpg
Thank you
It's gonna be like this:
RewriteEngine on RewriteCond %{HTTP_HOST} ^(?!www.)([^.]+).mydomain.com$ RewriteRule (.*) http://www.mydomain.com%1$1 [L,R=301]
1.4m articles
1.4m replys
5 comments
57.0k users