• Hi,

    Let me first say that english is not my first language and I’m not a web wiz so please bare with me.

    I want to redo one of my websites which is a domain installed in the public_html file under the default domain.
    I’ve installed worpress 4.0 in the dir folder under massacreanimal.org’s file as follows:

    /home/respe273/public_html/massacreanimal.org/dir/

    My 400 page error prevents me from accessing the admin login.
    My web hosting company says I should move all my sub domains outside public_html and then remove the public_html file.

    Is there a way that I can keep everything as is by simply adding code to the .htaccess file so it can work in actual directory?

    (GRAPHIC CONTENT)
    https://www.massacreanimal.org/dir/wp-admin/

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Your host is actually correct. You shouldn’t be or get into the habit of installing a wordpress install, inside of another wordpress install as these issues can occur.

    Moving the site to a folder above the /home/respe273/public_html folder is the best advice. If you have cpanel, create a subdomain and install it there with the file root being /home/respe273/subdomain.massacreanimal.org

    You’ll find you won’t run into the .htaccess issues and WP telling you something doesn’t exist. When you move the site, you’ll also probably not run into issues with the new host or account.

    Thread Starter jbeauchemin

    (@jbeauchemin)

    Thank you mypchost for your quick reply.

    It’s not a wordpress install inside a wordpress install.
    The website is standard and I want to create a new one with worpress.
    It’s not a sub domain but a regular domain. So I’m not sure that : subdomain.massacreanimal.org will work.

    I just created a copy (www.massacreanimal.org) directly in home.
    I’m not sure at this point what to do next.

    Thank you.

    Thread Starter jbeauchemin

    (@jbeauchemin)

    If this can help, here’s what’s in my htaccess file:

    # Cette ligne permet d’afficer la page index
    suPHP_ConfigPath /home/respe273/massacreanimal.org/

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    DirectoryIndex index.html index.cgi index.pl default.htm

    # Cette ligne permet la récursivité du fichier php.ini localisé dans public_hmtl
    suPHP_ConfigPath /home/respe273/massacreanimal.org/

    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^massacreanimal.org [NC]
    RewriteRule ^(.*)$ https://www.massacreanimal.org/$1 [L,R=301]

    rewriteRule ^/fr/payment\.htm$ /https://www.massacreanimal.org/index.html [R=301,L]

    Thread Starter jbeauchemin

    (@jbeauchemin)

    More help please ?

    I have moved the website outside public_html and I created a sub-folder named “dir3” in which worpress is installed. Since the website already exist and is up running, I don’t want to replace it until I’m done with the new design.

    If I type in https://www.massacreanimal.org/dir/wp-admin, the 404 error page shows up but if I type in https://www.massacreanimal.org/dir/wp-admin/index.php it gets me to the wordpress login page. But I still have the same problem when I do a preview in worpress, the 404 error page shows up instead.

    My host doesn’t know what to do with this.

    Please help me figure it out.
    Thank you.

    Please provide the absolute path to each installation….. is this a cpanel control panel you are using or another type?

    An example of an absolute path would be:

    /home/username/public_html/

    If your path for both the installations are within the public_html folder, you’ve not done what was recommended.

    Awaiting your reply.

    Thread Starter jbeauchemin

    (@jbeauchemin)

    Yes I’m using Cpanel

    Absolute path : /home/respe273/massacreanimal.org/dir3/

    I removed the site outsite public_html as requested by the host provider, because the main domain is in there (respect-animal.ca)

    Thank you

    Your explanations are slightly confusing…. removing = deleting?

    My understanding is that you have a primary domain – respect-animal.ca

    Your home folder is at: /home/respe273/

    Your primary domains (respect-animal.ca) website is located within the /home/respe273/public_html folder – this is where this website loads from correct?

    You have installed a 2nd version of your site at: /home/respe273/public_html/massacreanimal.org/dir/

    You now have a 3rd install (or a copy of the 2nd) located at: /home/respe273/massacreanimal.org/dir3/

    When a person visits the site (from original post, the wp-admin page)… it redirects. So when you visit https://www.massacreanimal.org/dir/wp-admin/ it will redirect to https://www.massacreanimal.org/fr/index.php with a 403 (Forbidden Error, which is restricted access).

    There is either a redirect in your present .htaccess in the root, the 2nd install or within the cpanel redirects or on the domain that is preventing access.

    Your NEW (3rd) install at /home/respe273/massacreanimal.org/dir3/ which I ASSUME has a browser URL of https://massacreanimal.org/dir3/ also redirects to that same page. Somewhere in your .htaccess or site/domain settings, you are redirecting that domain (possibly even a WP plugin you may be using?) that is causing you this headache. If you have done exactly what you were instructed, minus the .htaccess or redirect issues, then it should be working to access the wp-admin area at this link: https://massacreanimal.org/dir3/wp-admin

    If you are willing to trust me to take a look at your current configuration, I am willing to look at this and see what I might be able to figure out. I see you are hosted with hostpapa.com.

    You can email me directly at [Moderated].

    Maybe I’ve given you enough information to troubleshoot this on your own.

    Thread Starter jbeauchemin

    (@jbeauchemin)

    Yes I will send you the info by email.

    Thanks a lot.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @mypchost, thanks for helping out, but I’m going to have to ask you not to solicit contact information from these forums. If you feel strongly that the person asking for support will need professional support then you can forward that person on to WP Jobs or CodePoet.

    Unfortunately this discussion has now taken its course into your private support, and so I’ll be closing this thread.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Adding code ot .htaccess file in public_html’ is closed to new replies.