Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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]
</IfModule>

# 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

 
discard

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

Browse other questions tagged or ask your own question.