• Resolved scooby

    (@scooby)


    Does anybody know a way to place the main homepage for the blog (index.php) in the root directory while the rest of the blog is in its own directory??

Viewing 13 replies - 1 through 13 (of 13 total)
  • whistler2020

    (@whistler2020)

    yeah install into a folder and then move the index.php from that folder into your root

    Thread Starter scooby

    (@scooby)

    then most all the links are incorrect

    whistler2020

    (@whistler2020)

    try editing the index.php and add the install folder name in this case the folder is wordpress

    <?php
    session_start();
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./wordpress/wp-blog-header.php');
    ?>
    Thread Starter scooby

    (@scooby)

    I have edited that, it’s the permalinks that are all missing the “blog” folder in the link.. They are now like this:

    https://www.website.com/?p=1#comments

    when they need to be like this:

    https://www.website.com/blog/?p=1#comments

    Does that make any sense?? I don’t even know if they are all permalinks, but in most that I see that are incorrect the code this:

    a href"<?php the_permalink() ?>"....

    whistler2020

    (@whistler2020)

    yeah when you moved into the root you lose the install folder as part of the link

    whistler2020

    (@whistler2020)

    you could write a custom permalink and start with /blog

    Thread Starter scooby

    (@scooby)

    That would be awesome if you could point me into the right direction to put that in at.. I found the the_permalink() function in the link-template.php file… Is that where I would need to make those changes, or is there a better place to change all permalinks??

    Thanks for all the help..

    whistler2020

    (@whistler2020)

    its under options >> permalinks

    fourth option is custom

    Thread Starter scooby

    (@scooby)

    Yeah sorry.. I found it.. I though you were meaning to manually change the code.. I forgot about that feature.. But maybe you can help me now.. Since I did that using this code:

    /blog/%postname%/

    I now get that “500 Internal Server Error”. I’ve tried a few things off this page, but nothing seems to help.. Any ideas??

    whistler2020

    (@whistler2020)

    if wordpress is installed in /blog/ you might try renaming that folder to something else. might want to change the wordpress url in options first.

    Storyman

    (@storyman)

    I may way off base, but do you happen to have a folder named ‘blog’? I’m wondering if the error isn’t caused by there be no such folder.

    Just a guess.

    Thread Starter scooby

    (@scooby)

    I have a folder named blog in the root directory with all the wordpress files inside except for index.php.. That is in the root directory outside of the blog folder..

    I think my error has something to do with the .htaccess file.. I have to be doing something wrong.. It’s all about the 500..

    Thread Starter scooby

    (@scooby)

    Finally got it! Wow.. Well at least now it works the way I wanted..

    I set my permalink to this:

    /blog/%category%/%postname%

    and had to manually edit the .htaccess file from

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

    to

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

    Never had to touch the chmod, but it is now at default of 644 I believe..

    Whooohooo!! Fun stuff!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘blog home page placement’ is closed to new replies.