WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im not that good with htaccess files & regexes, and i'm trying to add a segment to a certain url. I'm building a website for a festival and we have a comon structure for the artists being: line-up > room > artist

I created a custom post-type & taxonomy to do this but when going to one room the url will be /room/orange with standard WP rewrites. I'm trying to edit the htaccess so that i can use line-up/room/orange for this.

Is this possible? and how can i do this?

This is what i tried so far:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^line-up/room/([a-zA-Z]+)$ /index.php?ilt_rooms=$1 [L]
RewriteRule . /index.php [L]

# END WordPress

but the parameters aren't passed to the right place because WP won't load the appropriate template and gives me a 404.

Also, when I don't comment out the last rewriteRule my css won't load, I just don't get this.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.