I’ve got a Zend Framework application that has a http://dashboard.domain.tld subdomain, and the rest of the application resides at http://domain.tld. I’d like to keep all the app code in the parent domain however, so I need to redirect the subdomain to the parent domain somehow.
I’ve got all the dashboard code in a Zend Module and I’ve set my .htaccess set up in the root subdomain folder like so:
RewriteEngine On
RewriteRule ^(.*)$ http://domain.tld/dashboard/$1 [NC,NS,L]
The redirect is working just fine, except that the redirected URL is showing up in the address bar, rather than the original URL. I need the URL to remain as it was entered by the user.
I’ve taken a look at .htaccess redirect without changing address bar and other similar questions but thus far nothing is helping.
Would appreciate any help!
You should try [P] flag in your dashboard.domain.tld configuration.