I have created a custom post type called 'event' and added an event called London 2012. I want the following URL structure for a page:
local.mysite.com/london-2012/speakers
I have created a page called Speakers giving me a working /speakers url (I have Permalinks set to 'Post name').
Now I created a static test site and added the following to the .htaccess:
RewriteEngine On
RewriteRule ^([A-Za-z0-9-]+)/speakers?$ /speakers.php [NC,L]
This meant that if I went to local.testsite.com/something/speakers it would display the content of speakers.php whilst retaining the orignal URL. Perfect! Or so I thought...
Now, having migrated the rule across to my Wordpress install (both by adding the rule in the .htaccess file directly - under the RewriteEngine on line - and through the add_rewrite_rule() function) I am getting strange behaviour.
RewriteRule ^([A-Za-z0-9-]+)/speakers/?$ /speakers?event=%1 [L]
Instead of the URL remaining the same and showing me the content of /speakers, it is actually redirecting me to the /speakers page and the URL is changing.
This is default behavior for a page in WP even without any modifications to the .htaccess file so I can only imagine that it is not matching my rule for some reason and then hitting the RewriteCond %{REQUEST_FILENAME} !-f line. Either that, or it is matching it but then continuing despite the [L] line.
Anyway I think that covers everything - if anyone has any ideas I'd really appreciate it as I'm going a bit crazy with this!
Update 1
Sorted - thanks Brian. Your solution did work but because the query variable was called 'event' it was getting confused and sending me to /speakers/ as a redirect. I changed it to simply be 'e' and it's fine now. Thanks again!