I have a web site for a customer on my server, the customer has his own domain.
I want keep the source files on my server and just to redirect the customer domain to show content of web site from my server.
- customer domain: www.a.com
- source file of web site: www.b.com/customer
I want to open in web browser www.a.com, show content from www.b.com/customer, but to keep www.a.com in address bar of web browser (including subfolders from www.b.com/customer).
Configuration: I am using managed server, cannot edit apache or php configuration, source web site is written in CodeIgniter. In CodeIgniter I put in config.php as base url: www.a.com. www.a.com is on one server (I have FTP access), there is .htaccess file in root:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^a.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.a.com [NC]
RewriteRule ^(.*)$ http://b.com/customer/$1 [L,R=301,NC]
On my server is www.b.com/customer, and in /customer folder there is also one .htaccess file with:
RewriteEngine On
RewriteBase /customer
RewriteCond $1 ^(application|system|private|logs)
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
RewriteCond $1^(index\.php|robots\.txt|favicon\.ico|public|assets|css|js|images)
RewriteRule ^(.*)$ - [PT,L]
RewriteRule / index.php/$1 [PT,L]
to hide 'index.php' in web browser. So far works everything fine, upon call of www.a.com, user is redirected to www.b.com/customer, pages are correctly displayed. All links are shown as: 'www.a.com/some_page.php' and are also working. The only problem is that in address bar of web browser, the user sees 'www.b.com/customer'. I want to have there 'www.a.com/some_page.php' This is detailed problem description - please let me know if it is possible to solve? thanks and best regards, firestone