apache - Use htaccess to remove any sub directories in URL -
I run an expression engine site, regardless of any subdirectory sub directory names typed in the address bar, an article page Will load.
For example, all these addresses:
http://hellothere.example.com/health/mental/depression http://cats.example.com/health / Psychic / depression http://dogs.example.com/health/mental/depression http://www.batman.example.com/health/mental/depression http: //www.1.2.3.4.5.6.example. com / health / mental / depression will load example.com/health/mental/depression Obviously, it is less than ideal Since SEO, I have a potentially unlimited number of duplicate URLs.
I'm trying to figure out how to use htaccess to strip anything before example.com and replace it with just www.
Any help would be appreciated!
You can not do it with htaccess, so how to do this is to set up a wildcard DNS record so that all Requests (* .example.com) all be directed to the same server.
View
Comments
Post a Comment