Accessing WordPress subdirectory from ROOT url (9 posts)

  1. budykiller
    Posted 3 years ago #


    I have followed the FAQ on this website :

    My directories are :
    - / (root)
    - wp (wordpress files)

    So now, i don't have to type "http://www.mysite.com/wp/" to access my blog, but only "http://www.mysite.com/"

    However, i also run an English version of my site with the help of WordPress Multisite. The address is : "http://www.mysite.com/wp/en/"

    Now when i want to access it directly by typing : "http://www.mysite.com/en/", it gives an 404 error. The website wants to load "http://www.mysite.com/en/engineering/" because i have a webpage with this name. But i don't understand why it tries to load this.

    For your information, i've modified both siteurl values in the database :
    - wp_options (main site)
    - wp_2_options (english website)

    Could someone explain me what i missed in the process ?

  2. fonglh
    Posted 3 years ago #

    Could someone explain me what i missed in the process ?

    You missed this line in the original documentation.

    WARNING: Multisite Users - Please Read
    This process is not applicable to and does not work if you have enabled MultiSite. However, WordPress 3.5 will support this when it is released, see http://core.trac.wordpress.org/ticket/19796

  3. budykiller
    Posted 3 years ago #

    Thank you fonglh. I didn't check the original documentation as i didn't know there was one.

    So, I've replaced the 3 modified files provide in your last link (the future 3.5 WordPress files) but it still does not work, it fails the same way.

    It seems my htaccess is not correct. It doesn't know how to handle all "/en/" queries to the proper directory "/wp/en/".

    I would like to directly contact the members who wrote the modifications but it seems WP doesn't allow to private message members :(

  4. fonglh
    Posted 3 years ago #

    For now, you could try not running multisite from a subdirectory. See http://codex.wordpress.org/Moving_WordPress

    Alternatively, you could try running WordPress trunk. That's the development version with the latest features.

    Do backup your database before you try anything.

  5. budykiller
    Posted 3 years ago #

    Thanks fonglh.

    I've decided to go for the second option as i want to keep clean the root structure of my website.

    With the besta tester plugin, i'm now running version 3.5. beta 2. So multisite in a subdirectory with access from ROOT should work.

    But i'm still facing the same issue. Well, with a minor difference as i was telling you a wrong page was loading "engineering", but the page that was loading is actually "Environnement" (in french). Sorry for the mistake.

    What happens exactly is :
    - real wordpress path = /wp/
    - Main site -> http://www.mywebsite.com
    - English version -> http://www.mywebsite.com/en/

    If you type the english address in your browser url bar, my website loads the french webpage "environnement". I think this is because it starts with "en" in the name of the page ?

    Anyway, i don't understand what is the problem. I Should be able to access all my websites from the ROOT URL (http://www.mywebsite.com/) without the "/WP/" in the address.

    Note : for the moment, the main website is working. It's only the /EN/ website that is broken.

  6. budykiller
    Posted 3 years ago #

    Please, could someone use WP 3.5 beta 2 and test if when WP is installed in a subdirectory, this directory is hidden in the URL and you can still access all your blogs ?

  7. What's in your .htaccess?

  8. budykiller
    Posted 3 years ago #

    As my company was in a hurry for the website, i had to go for option 1 : move of all the files in the root, and updates all databases entries.

    Anyway, here is my .htaccess from that time :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Thank you Mika

  9. If that's the .htaccess from when you were in a subfolder, I know what's wrong.

    RewriteBase /

    Needed to be
    RewriteBase /FOLDER/

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.