• hi,

    i have a little issue, for which i found no perfect answer, at least i think so.

    at the moment i have a html site located in the root directory lets call it root. in a subdirectory root/website i built a wordpress site and now i want the url to point to that site. how can i achieve that?

    thanks
    conte

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    You can try to do a Rewrite rule with help of your WordPress .Htaccess file.

    1) Do a backup of your .Htaccess file. Because I don’t know if I’m in the right way.

    2) You should have this content in your .Htaccess file (root/website/) :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    3) Locate the line :
    RewriteRule . /index.php [L]
    and replace it by : (if your subdirectory is called “website”)
    RewriteRule ^.*$ /website/index.php [L]

    4) If this doesn’t work, restore your backcup .Htaccess file

    Thread Starter conte001

    (@conte001)

    thanks, but this didnt work. the site is broken if i do that

    conte

    Sorry, I do not have enough knowledges to help you.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Changing url to subdirectory’ is closed to new replies.