Viewing 5 replies - 1 through 5 (of 5 total)
  • Method I as explained in “Giving WordPress Its Own Directory” may be what you are looking for.

    Here are the steps:

    1. After Installing the wordpress in root folder, move EVERYTHING from root folder into subdirectory.
    2. Create a .htaccess file in root folder, and put this content inside (just change example.com and my_subdir):
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    RewriteCond %{REQUEST_URI} !^/my_subdir/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /my_subdir/$1
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    RewriteRule ^(/)?$ my_subdir/index.php [L] 
    </IfModule>
    Thread Starter gatomadrid

    (@gatomadrid)

    Hello,

    I try without sucess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>

    RewriteEngineRewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?sub.dominio.com$
    RewriteCond %{REQUEST_URI} !^/web/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /web/$1
    RewriteCond %{HTTP_HOST} ^(www.)?sub.dominio.com$
    RewriteRule ^(/)?$ web/index.php [L]
    </IfModule>

    # END WordPress

    the result is:

    “GET / HTTP/1.1” 500 1622 “-” “Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0”

    You may have more than one .htaccess file.

    Make sure the file is on the root folder and not on /web

    Thread Starter gatomadrid

    (@gatomadrid)

    I´ve got just one in the root folder.

    what can be wrong? i don´t understand the sintax of this file.

    Thread Starter gatomadrid

    (@gatomadrid)

    Can anyone help me?

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

The topic ‘Folder’ is closed to new replies.