View Full Version : Forwarding from subdomain
Hi,
Is it possible to use pages with subdomains to have/visit different pages with vBadvanced CMPS by using modrewrite ?
I think this may work ;
.htaccess : RewriteEngine On
RewriteRule ^subdomain.domain.com* http://www.domain.com/cmps_index.php?page=mypage[L,NC]
Any idea ?
Thanks
FD929
08-27-2005, 09:43 PM
I used the domain redirect in cPanel and this is the htaccess info that was placed in the subdomain folder. Hope it helps.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.domain.com$
RewriteRule ^(.*)$ http://www.domain.com/cmps_index.php?page=mypage[L,NC]/$1 [R=301,L]
Thank you FD929, i will try this.
Another question on this, do you how to achieve sam result without forwarding with .htaccess ?
I mean subdomain.domain.com displays http://www.domain.com/cmps_index.php?page=mypage silently (without changing the url in the browser or without forward action) ...
Thanks
Brian
08-28-2005, 03:01 PM
Make a copy of your cmps_index.php file, rename it to index.php, and look in the file for this code:
define('VBA_SCRIPT', 'CMPS');
Just below that, add this:
define('VBA_PAGE', 'mypage');
Then upload the file to the folder for your subdomain.
FD929
08-28-2005, 03:20 PM
No, unfortunately it is a forward. Typing subdomain.domain.com will forward you to the page and change the url in the address bar.
I'd go with what Brian said if I had to choose. :)
I am interested in this because my subdomains not used that much.
So for having less folders/files to manage i decided to go with forwarding.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.