: Is it possible to configure a .htaccess file to access example.com/subdomain/ without any redirects? I need to configure 2 CMS's on a domain. The first is on example.com. The other is on subdomain.example.com.
I need to configure 2 CMS's on a domain. The first is on example.com. The other is on subdomain.example.com. Is it possible to configure a .htaccess file so that the second CMS is accessible as example.com/subdomain/ without redirects?
More posts by @Berumen354
2 Comments
Sorted by latest first Latest Oldest Best
mod_proxy can be configured from .htaccess to serve content from a different server or host as a subfolder. You would use a rewrite rule with the [P] flag (for proxy) in your .htaccess to do so:
RewriteRule ^/subdomain/(.*) subdomain.example.com/ [P]
ProxyPassReverse /subdomain/ subdomain.example.com/
Not without redirects. The only way you can do it without a redirect is to use a reverse proxy (either apache, or nginx would work great).
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.