Unfortunately there is no pure mod_rewrite solution to this problem (in .htaccess files) because you can't rewrite outside the (sub domain's) doucment root.
First you should ask your host if they can change the sub domain's document root.
If they can't, you could try creating a
Symbolic Link from /home/find/public_html/quebeccommerceavendre to /home/find/public_html.
If you can't do that try this in a .htaccess file in /home/find/public_html/quebeccommerceavendre
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^quebeccommerceavendre.findmybusiness.biz$ [NC]
RewriteRule ^(.*)$ http://quebeccommerceavendre.findmybusiness.biz/$1 [R=301,L]
RewriteRule ^(.*)$ http://findmybusiness.biz/$1 [P,L]
It requires that you have mod_proxy available.
Finally, it would be good if we can take off the lang_code from the url, but it should be redirected to lang_code=3 anyways
What do you mean about it being redirected anyway?
Does it only need to be there for the index.php file? If it does, try adding
- Code: Select all
RewriteRule ^(index\.php)?$ http://findmybusiness.biz/index.php?lang_code=3 [P,L]
before
- Code: Select all
RewriteRule ^(.*)$ http://findmybusiness.biz/$1 [P,L]
If not, replace
- Code: Select all
RewriteRule ^(.*)$ http://findmybusiness.biz/$1 [P,L]
with
- Code: Select all
RewriteRule ^(.*)$ http://findmybusiness.biz/$1?lang_code=3 [P,L]