Forums

[resolved] blog home page placement (14 posts)

  1. Scooby
    Member
    Posted 4 years ago #

    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??

  2. whistler2020
    Member
    Posted 4 years ago #

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

  3. Scooby
    Member
    Posted 4 years ago #

    then most all the links are incorrect

  4. whistler2020
    Member
    Posted 4 years ago #

    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');
    ?>
  5. Scooby
    Member
    Posted 4 years ago #

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

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

    when they need to be like this:

    http://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() ?>"....

  6. whistler2020
    Member
    Posted 4 years ago #

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

  7. whistler2020
    Member
    Posted 4 years ago #

    you could write a custom permalink and start with /blog

  8. Scooby
    Member
    Posted 4 years ago #

    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..

  9. whistler2020
    Member
    Posted 4 years ago #

    its under options >> permalinks

    fourth option is custom

  10. Scooby
    Member
    Posted 4 years ago #

    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??

  11. whistler2020
    Member
    Posted 4 years ago #

    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.

  12. Storyman
    Member
    Posted 4 years ago #

    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.

  13. Scooby
    Member
    Posted 4 years ago #

    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..

  14. Scooby
    Member
    Posted 4 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.