• hi all,

    Ive run into a bit of a problem with running wordpress in a sub folder.
    I have one install of wordpress in the main root of the site and then i have new install in a sub folder which is a different website.
    ive used an addon domain to point to the sub folder. so the idea is that if you go to https://www.domain1.com you get the first website and if you go to https://www.domain2.com you get the other website.

    for some reason if i try to update the permalinks on site 2 in the sub folder using wordpress it blanks the htaccess file. i want to change it so that the permalink structure is category/postname.

    ive tried adding this to the htaccess file in the subfolder for site2:

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

    this allow me to navigate the site fine using domain2 but for some reason i cant get it to use the permalin structure i am stuck with domain2.com/?page_id=17
    how can i get this to work so i hav the names of the posts etc?

    is it because i have a htaccess file in the root for site 1?
    basically site1 has a htaccess file in the root and then there is a htaccess file in the subfolder for site2 i think the htaccess file in the main root is overriding the site2 htaccess file is there anything i can do?

    this is the htaccess file code in the root site:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} !^www\.domain\.org
    RewriteRule (.*) https://www.domain.org/$1 [R=301,L]
    
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    ErrorDocument 404 /index.php?error=404
    
    # END WordPress

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi slee,

    I think I might have the answer to your problem…but don’t get too excited just yet…I said I think;)

    Okay, so…I have numerous installations of wordpress so I can create sub directories for my site. My site is https://sliceoflemon.com. I use Liquid Web as my web hosting company, so through them, I downloaded another installation of wordpress and for example, called my folder, “funny-things.” Now the url to get to all the posts filed under “funny-things” is https://sliceoflemon.com/funny-things.

    If I understand your problem correctly, (and if you were me) you want permalinks to show up on sliceoflemon.com, as well as sliceoflemon.com/funny-things.

    Now I’ll tell you what I did in order to make that happen — hopefully this will help you.

    In the public_html folder of my FTP (I use Leech) there is a file called .htaccess. In the wp-admin section of my main site (the dashboard) under Settings, there is the option Permalinks. Click on that, and then choose your format. I.e. day/month/post etc.

    Next, once you save your changes, wordpress will automatically ask you to update your .htaccess folder, and they will give you some code to do it.

    Copy and paste that code into Notepad, or Wordpad, or a similar text editor. Then, save that file to your desktop, and name it .htaccess. Because you saved it in a text editor, it will likely have renamed itself .htaccess.txt and that’s okay for now.

    Back in your FTP, once you see the file you made, rename it to .htaccess, and then upload.

    Check your main site, and that should work.

    Next…
    In order to get permalinks to sub directory “funny-things” (https://sliceoflemon.com/funny-things) you have to make new .htaccess files for each sub directory.

    This is how I did mine:
    In the FTP, click on the public_html folder. Once inside, you will see folders you created, i.e. funny-things.

    You have to go back to the wp-admin section (dashboard) that controls your new wordpress installation of “funny-things” and change the permalink settings again so you can grab that code like you did for your main site.

    Once you have that code, you have to paste it into a text editor, and then once it’s in your FTP, rename it, and drop it in the “funny-things” folder.

    Rinse and repeat for every sub directory.

    Problems I ran into:

    I got a little confused with all the cutting/pasting/saving that was going on, so just make sure you do one folder at a time. Also, because you can only upload a folder with the name .htaccess, it’s hard to keep track since you can’t have folders named .htaccess1, .htaccess2, etc.

    I really, really, really hope this helps you, because this has been driving me crazy for days, and sometimes the forums are super overwhelming, and sometimes it’s hard to find the exact information you’re looking for.

    Good luck!

    Sabrina

    P.S. Don’t forget to open the “funny-things” folder, and then drop the file in. I hope that part was clear. ??

    @slee – did you have any luck. I’m having exactly the same problem and can’t work it out.

    @sliceoflemon – I CHMOD the .htaccess files to 755 and let wordpress write the code itself so I don’t have to do the cutting, pasting and ftping.

    @slee – I tried turning off all my plugins and now the permalinks work. It’s always the damned plugins!!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘1 site 2 blogs permalink problem’ is closed to new replies.