Help with mod_rewrite?
-
I tried to post this in the wp-advanced forum, but it said that I need to be a moderator to post there.
Anyway, I have custom permalinks enabled, which adds the following to my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I have a category of posts, however, which intentionally don’t have post names (making the %postname% value empty). This causes the permalinks for those to not work. I’m trying to figure out how to create a condition that if %postname% is blank it will use %post_id% instead, but I’m definitely no pro when it comes to mod_rewrite and regular expressions. I’ve tried looking up documentation for RewriteCond, but it’s not really clearing things up for me.
Does anybody know what rewrites I would need to add?
Thanks!
- The topic ‘Help with mod_rewrite?’ is closed to new replies.