• Hello,
    I have a instance of wordpress 3.5.1 installed in a subfolder “website” on the server. I’m trying to follow the how-tos on making the URL people use/see just the domain name and not include the sub directory in the URL. All my pages are currently working, images display fine, but the homepage gives me a ‘page not found’ error. For the life of me I cannot resolve this issue.

    I’ve tried adding statements to the config.php file, I’ve looked at the .htaccess files, etc. Nothing seems to get it to work… When visiting the homepage, it automatically adds the subfolder name to the path of the url.

    Any help to point me in the right direction will be greatly appreciated. Thanks in advance.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Kurt

    (@highfxmedia)

    What are your settings for WordPress Address & Site Address in the General Settings?

    Have you reviewed Using a pre-existing subdirectory install here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    Thread Starter phendyr

    (@phendyr)

    WordPress address (URL): http://www.mywebsite.com/website
    Site Address (URL): http://www.mywebsite.com

    Yes thank you for that article reference I have been looking at it, and I have confirmed that I copied where I needed to copy files and moved where I needed to move…. a little dumbfounded at the moment.

    Thanks for the feedback.

    Kurt

    (@highfxmedia)

    What’s in your index.php? And is it in the root?

    Thread Starter phendyr

    (@phendyr)

    require(‘./website/wp-blog-header.php’);

    yes it is in the root.

    Kurt

    (@highfxmedia)

    Hmmm… Perplexing.

    Let’s look at the .htaccess file. What’s in this file?

    Thread Starter phendyr

    (@phendyr)

    # 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

    Kurt

    (@highfxmedia)

    It doesn’t look right if WP is running in a subfolder. Go to Settings => Permalinks, click on the Save Changes button. Refresh your browser and see if that fixes it. If not, change the permalink setting to default and save. Refresh your browser to see if it fixes it. Either way, set the permalinks back to what you want.

    If the above doesn’t work, edit the .htaccess file and change these two lines:

    RewriteBase /website/
    
    RewriteRule . /website/index.php [L]

    Thread Starter phendyr

    (@phendyr)

    making the change above, and changing the permalinks to default, corrected the issue. after reverting them back to my desired style (post name) the homepage is broken again.

    Thank you for your continued help to debug this. I greatly appreciate it.

    Kurt

    (@highfxmedia)

    You’re welcome.

    Try editing the .htaccess file as indicated previously.

    Thread Starter phendyr

    (@phendyr)

    I have that modification currently in place, as written below, but the homepage is currently not found:

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

    # END WordPress

    Kurt

    (@highfxmedia)

    It looks like a forward slash is missing in the last rewrite rule. It should be:

    RewriteRule . /website/index.php [L]
    Thread Starter phendyr

    (@phendyr)

    hmm, added that and still no joy. tried resaving permalinks after uploading the .htacess file, no joy.

    Thread Starter phendyr

    (@phendyr)

    …. and it still tries reverting the homepage to the .com/website/ directory… all other pages display correctly at .com/page-name/

    Kurt

    (@highfxmedia)

    Well, I guess it could be the hosting setup. Does your hosting configuration point to the /website/ folder or to the root?

    Thread Starter phendyr

    (@phendyr)

    good question, I’ll dig a little deeper and post what I find.

    Thanks.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘site URL change – all ok but homepage?’ is closed to new replies.