Mobile app version of vmapp.org
Login or Join
Berumen354

: 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.

@Berumen354

Posted in: #Domains #Htaccess #Subdirectory #Subdomain

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Berumen354

2 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn148

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/

10% popularity Vote Up Vote Down


 

@Samaraweera270

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).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme