I have a parked domain that I want to load from a sub-folder.
In my root public_html folder I have the following in my .htaccess:
RewriteEngine on
RewriteCond %{HTTP:Host} ^(?:www.)?parkeddomain.com(?:|/)$
RewriteCond %{REQUEST_URI} !^/_domains/myparkeddomain_com(?:|/)$
RewriteRule ^(.*)$ /_domains/myparkeddomain_com/$1 [NC,L,NS,QSA]
The problem is when I go to my parkeddomain.com
I see my index in /_domains/myparkeddomain_com/
folder but when I try to install WordPress there it redirects and gets into parkeddomain.com/_domains/myparkeddomain_com/wp-admin/install.php
.
How can I configure so it loads without showing /_domains/myparkeddomain_com/
?
I want /folder
and /folder/folder/file.php
on my parkeddomain.com
to be parkeddomain.com/folder
or parkeddomain.com/folder/folder/file.php
- and not
parkeddomain.com/_domains/myparkeddomain_com/folder
orparkeddomain.com/_domains/myparkeddomain_com/folder/folder/file.php
- …Makes sense?
So essentially what I want is my website on my parkeddomain.com
to load from my public_html/_domains/myparkeddomain_com/
as if it were loading from public_html/
.
Is it possible to achieve this with .htaccess
directive?
Thanks.
2
Answers
It seems that what I was missing was an
.htaccess
in the the wordpress folder itself.This question is best asked at the Linux Stack Exchange (I assumed your server is on Linux), since it is about Apache configuration.
From my experience, what you ask cannot be achieved from .htaccess, it requires a virtual host configuration entry. You can see examples at the Apache documentation, or try Googling ‘apache virtual host example’.