Forums

mod rewrite for rewriting permalinks (3 posts)

  1. LieliskaisTM
    Member
    Posted 1 year ago #

    Had problem with showing article pages for nesting categories. Permalink structure: /article/%category%/%postname%/
    Example: www.mysite.com/article/parent/chilgd/article-name/2/ opens first page.
    Decided to solve this problem by rewriting url in .htacces, like so:
    RewriteRule ^article/(.+/)?([-a-z0-9]+)/([1-9]+[0-9]?)/?$ ?name=$2&page=$3 [L]
    RewriteRule ^article/(.+/)?([-a-z0-9]+)/?$ ?name=$2 [L]

    Hoping to also reduce load on system by preparing GET parameters.

    But looks like wordpress is redirecting my request with permalink, which results in first case.
    Is it possible to stop wordpress from analyzing url if it gets prepared parameters? Or maybe there is better solution for this problem?

  2. t-p
    Member
    Posted 1 year ago #

  3. LieliskaisTM
    Member
    Posted 1 year ago #

    Well thank's t-p, but I know how to set up a permalink on wordpress.

Topic Closed

This topic has been closed to new replies.

About this Topic