skip to Main Content

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 or parkeddomain.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


  1. Chosen as BEST ANSWER

    It seems that what I was missing was an .htaccess in the the wordpress folder itself.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    

  2. 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’.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search