• Hello,
    I’m using 1.3-alpha-4, and tried to sort out my permalinks as in the title of this post, based on the possible values.
    This lead to a 500 Int. Server error. Does “/%category%/%postname%” work (the whole idea seems complicated at best) or am I barking up a tree that has yet to be planted?

Viewing 14 replies - 1 through 14 (of 14 total)
  • 1.3 Changelog says that ” permalink generation code which now supports %author%, %category%”.
    Cool, but I’m wondering if someone has the /%category%/%postname% working in some capacity somewhere. I had .htaccess troubles, it appears… Hmm… off to tweak

    Thread Starter pekim

    (@pekim)

    Well, that sorts that, htaccess problems was all it was, not functionality. Need to sleep more to solve problems…

    Well, that sorts that, htaccess problems was all it was, not functionality. Need to sleep more to solve problems…

    What was the solution to your problem? I’m trying to get this working too but every combination of rewrite rules seems to do damage to another part of my site.

    /%category%/%postname doens’t work, it throws the entire thing into a full loop because of subcategories.
    So we have structures like:
    /category/subcategory
    Which is the same as:
    /category/postname
    It throws it into an endless loop directing it two (actually about 4) different places at once. If you don’t use subcats – no problem. If you do – you’re screwed.
    My solution: /archives/category/postname. It’s meeting it halfway.

    You can have a permalink that is /%category%/%postname%/, but not if you also use a category base of “/”. The two will conflict.
    Try /%category%/%postname%/ with a recent nightly. Problems with it should be fixed now. There may still be some problems with Apache 1.3’s somewhat broken mod_rewrite. If you have any problems, report them in this thread and I’ll take a look. Make sure you update your rewrite rules in htaccess.

    I ended up using /entry/%category%/%postname% instead (my rewriteBase is /). I wish there was a way to keep a shorter permalink, but I guess that won’t come until later. Thanks for the help guys.

    oops on the code part, says to use code and backticks hnn

    Are you using the latest 1.3? The wp-admin problem should be fixed. Also, make sure you update .htaccess with the latest rules.

    With /%category%/%postname% the last rewrite rule should look like this:
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/?$ /index.php?category_name=$1 [QSA,L]

    Do you have that? If so, then you might try adding the two RewriteConds before the following rule as well.
    RewriteRule ^(.+)/([^/]+)/?([0-9]+)?/?$ /index.php?category_name=$1&name=$2&page=$3 [QSA,L]
    What version of Apache do you have?

    I’m trying to get this to work as well.
    I’m trying to use /%category%/%postname%/ as the structure
    But get a 404 – Object Not Found error?
    This is what my htaccess file looks like … and it has the rewrite conditions and rules that rboren mentioned in the above posts — but still doesn’t work.
    —————
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /cms/wp/
    RewriteRule ^feed/?([_0-9a-z-]+)?/?$ /cms/wp/index.php?feed=_$1 [QSA,L]
    RewriteRule ^comments/feed/?([_0-9a-z-]+)?/?$ /cms/wp/index.php?feed=_$1&withcomments=1 [QSA,L]
    RewriteRule ^page/?([0-9]{1,})/?$ /cms/wp/index.php?paged=$1 [QSA,L]
    RewriteRule ^site/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?pagename=$1&feed=$2 [QSA,L]
    RewriteRule ^site/([^/]+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?pagename=$1&paged=$2 [QSA,L]
    RewriteRule ^site/([^/]+)/?$ /cms/wp/index.php?pagename=$1 [QSA,L]
    RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?s=$1&feed=$2 [QSA,L]
    RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?s=$1&paged=$2 [QSA,L]
    RewriteRule ^search/(.+)/?$ /cms/wp/index.php?s=$1 [QSA,L]
    RewriteRule ^category/(.+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^category/(.+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?category_name=$1&paged=$2 [QSA,L]
    RewriteRule ^category/(.+)/?$ /cms/wp/index.php?category_name=$1 [QSA,L]
    RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?author_name=$1&feed=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?author_name=$1&paged=$2 [QSA,L]
    RewriteRule ^author/([^/]+)/?$ /cms/wp/index.php?author_name=$1 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /cms/wp/index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /cms/wp/index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /cms/wp/index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
    RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /cms/wp/index.php?year=$1&monthnum=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?year=$1&feed=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /cms/wp/index.php?year=$1&paged=$2 [QSA,L]
    RewriteRule ^([0-9]{4})/?$ /cms/wp/index.php?year=$1 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/trackback/?$ /cms/wp/index.php?category_name=$1&name=$2&tb=1 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?category_name=$1&name=$2&paged=$3 [QSA,L]
    RewriteRule ^(.+)/([^/]+)/?([0-9]+)?/?$ /cms/wp/index.php?category_name=$1&name=$2&page=$3 [QSA,L]
    RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /cms/wp/index.php?category_name=$1&feed=$2 [QSA,L]
    RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /cms/wp/index.php?category_name=$1&paged=$2 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+)/?$ /cms/wp/index.php?category_name=$1 [QSA,L]
    </IfModule>
    # END WordPress
    ——————

    I’m using 1.3-alpha-4 and the latest nightly, and I’m also interested in using /%category%/%postname%/ , but after using the “update permalink structure” button i dont get a new copy of new rewrite rules. What gives?

    bruce:
    now that it works, do you think you could publish a copy of the working htaccess?

    I’ll try to fix this in CVS tonight. I wish I could get the RewriteConds to apply to the entire block of RewriteRules, rather than just the rule the conds immediately precede.
    Note that these alternative rules will avoid all of these problems.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘/Êtegory%/%postname% – Possible?’ is closed to new replies.