WordPress.org

Ready to get started?Download WordPress

Forums

What permalink string to hold all posts in the root? (5 posts)

  1. astoller
    Member
    Posted 7 years ago #

    Hi

    Struggling to make this work and hope you can help.
    I would like to hold all my blog posts in the root for search engine reasons.

    Should i use
    /%postname%.php/

    Then whatever wordpres generates paste it into .htaccess?
    I have tried this but when i visit my blog i cant navigat to my posts.

    I get:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    But when I browse any postings, although i dont get a 404, i dont get my article either.

    thanks for any help with this
    Art

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Why not just /%postname% instead?

    This won't affect search engines in the slightest, BTW. They don't care about your URL. Really.

    And the .htaccess will be the same regardless of your permalink structure.

  3. tsguitar
    Member
    Posted 7 years ago #

    You might be trying to do something unnecessary; I don't think search engines care which directory something is in and I don't think you get more hits if pages are in the main site directory. That said...

    You should be able to just enter /%postname%/ into the permalink box. Did you try it? And I believe that WP 2.0 and up doesn't use .htaccess to generate permalinks. It's done internally, so whatever you put in .htaccess should have no impact other than to disable WP permalinks all together. Anything you're trying to do to customize those permalinks needs to be done through your WP admin area.

  4. astoller
    Member
    Posted 7 years ago #

    When I post in /%postname%/ I get the path
    generated as
    http://www.domain.com/categories/supplements/

    I would prefer not have the 2 sub directories but I cant figure out how to remove one of themn so i get

    http://www.domain.com/supplements/

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    You can't do that. The "category" is built in, and cannot be removed.

    The permalink setting controls the links that describe your individual post pages. The category and date archive permalinks and similar are fixed, and cannot be changed via the admin interface.

Topic Closed

This topic has been closed to new replies.

About this Topic