• Resolved dwdallam

    (@dwdallam)


    Per the instruction here:
    “Using a pre-existing subdirectory install”
    https://codex.www.ads-software.com/Giving_WordPress_Its_Own_Directory

    The method isn’t working for me. Here is my site URL:
    https://www.dwdallam.com/index.php

    The file only loads a blank page.

    I tried both the WP htaccess file and then appending the WP access file to the end of the original server access file. The original already had the WP information in it, but without the new WP directory. So I updated that information with the WP htaccess information.

    The index.php file reads:
    https://pastebin.com/BN1MndAT

    Last, I have a question about the cleanest way to do the above. Would a server redirect be a more clean solution, for instance, with search engines?

    Last, it looks like my hosting company is working on this problem since the index.php file has been duplicated as “index.php.old” which I did not create.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The site open fine for me https://www.dwdallam.com/ clear your Cache press Ctrl+F5

    Thread Starter dwdallam

    (@dwdallam)

    That’s because you hit the index file. That’s not the problem. The problem is with the URL above, which ends with the “index.php” file, and not “index.html.” (According to the link you provided.)

    You mean to say that you have two index files in root if so you can not have two index files in a folder.

    Thread Starter dwdallam

    (@dwdallam)

    Sure you can as long as you set the Apache server to look for each file in a series. The first one it finds, it loads. And even if you don’t have it set, you can still call the file be manually typing any URL you wish. In this case, the index.php file only passes the browser to the WP directory defined in it.

    After that, it never accesses the site root again until someone calls for that file again.

    Unless I’m missing something.

    Thread Starter dwdallam

    (@dwdallam)

    I’m going to be working on the site so I’ve changed it back to it’s default settings as far as directories go. If anyone has any suggestions, let me know.

    Thread Starter dwdallam

    (@dwdallam)

    I’ve decided to go with the HTACCESS file for a clean redirect.

    Search engines no no differently, and everything works like it should, plus the directory of WP does not show either: https://www.yourdomain.com/page.php etc etc

    I’m going to post here my htaccess file changes so others can use the same method:

    Note to moderators: There is actually only 7 lines of real code here. The rest is only a tutorial.

    You can actually paste this entire tutorial into your htaccess file changing the domain and subdirectory to your own.

    # Change ‘dwdallam.com’ to be your main domain.

    RewriteCond %{HTTP_HOST} ^(www.)?dwdallam.com$

    # Change ‘WP’ to be the directory you will use for your main domain.

    RewriteCond %{REQUEST_URI} !^/WP/

    # Don’t change these line.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Change ‘WP’ to be the directory you will use for your main domain.

    RewriteRule ^(.*)$ /WP/$1

    # Change ‘dwdalam.com’ to be your main domain again.
    # Change ‘WP’ to be the directory you will use for your main domain
    # followed by / then the main file for your site, index.php, index.html, etc.

    RewriteCond %{HTTP_HOST} ^(www.)?dwdallam.com$
    RewriteRule ^(/)?$ WP/index.php [L]

    That’s it. <–don’t copy this

    Thread Starter dwdallam

    (@dwdallam)

    I resolved this by cleaning out my root directory of misc htaccess files. I used the index.php as per the instructions. I DID NOT copy the WordPress htaccess file. Works perfectly.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with: Using a pre-existing subdirectory install’ is closed to new replies.