WordPress.org

Ready to get started?Download WordPress

Forums

URL rewriting problem (4 posts)

  1. vikasumit
    Member
    Posted 7 years ago #

    Hello,

    I am running WordPress with Semilogic Theme and its plugins. Every thing is working fine, But I observe a very unrealistic problem.
    when I use Custom "permalinks" through wp-admin->options, and set it to /%category%/%postname%-%post_id%.html
    it doesn't work. Though during my testing i try different combinations, it works for some (occassionly) but next day it stop doing so. Not sure what is the problem.

    I can use given options perfectly with my installation.i.e. name bases, numeric all other links are working.

    http://www.example.com/polyphonic-ringtones/ [Working]
    http://www.example.com/date/2006/10/04/ [Working]
    http://www.example.com/classical-ringtones/with-you-jessica-simpson-132.html [not working]

    Please help.

  2. alphonse
    Member
    Posted 7 years ago #

    If you read the wiki, %category% might not always work.

    Note on using %category%
    %category% does not work correctly with some implementations of mod_rewrite in Apache versions prior to 2. If you are using Apache 1 and experience problems with using %category, either do not use %category% in your permalink structure, or refer to Schlueterica's plugin (http://isaacschlueter.com/plugins/i-made/lucky-13-rewrite/).
    Note on using %category% with multiple categories on a post
    Where you assign multiple categories to a post, only 1 can show up in the permalink. This will be the lowest numbered category (see Manage Categories). The post will still be accessible through all the categories as normal.

  3. vikasumit
    Member
    Posted 7 years ago #

    Hi,

    I have posts in multiple category, and I am using Apache 2.0 +

    here is my .htaccess for your reference

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    # Begin non-www page protection #
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www.getmeringtone.com [NC]
    RewriteRule ^(.*)$ http://www.getmeringtone.com/$1 [L,R=301]
    </IfModule>
    # End non-www page protection #

    DirectoryIndex index.php index.html

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

    # END WordPress

    hope that helps

  4. vikasumit
    Member
    Posted 7 years ago #

    Hi,

    Not sure why and how that problem created. I read most of blog/forum post and all suggest some conflict to url rewriting that stop Working of URL Permalinks.

    I solved my problem, by doing two things.

    1) Sort the URL rewriting rule as per my usage.
    2) Add some custom rules as per my requirement. all these need to be done in classes.php file (in function function rewrite_rules() )

    Hope that help others too

Topic Closed

This topic has been closed to new replies.

About this Topic