blah.com/template_group/template/variable1/variable2/variable3/etc...
I'm looking to create the perception that sites are grouped under an account exec and a customer/prospect. For example:
blah.com/account_exec/circa1977/template_group/template
So I need to consistently bounce segments 3 & 4 to 1 & 2 in the rewritten URL.
My first attempt was with
blah.com/account_exec/circa1977/portal
This worked for that:
- Code: Select all
RewriteRule ^(.*)/(.*)/(.*)$ /index.php/$3/$1/$2 [L]
The rewritten URL was read as portal/account_exec/circa1977, using the portal template and treating the other two values as variables I can filter content on.
Then I wanted to add a variable to the end, so I updated it to:
- Code: Select all
RewriteRule ^(.*)/(.*)/(.*)/(.*)$ /index.php/$3/$1/$2/$4 [L]
But then requests for:
blah.com/account_exec/circa1977/portal
failed.
I can do some work with subdirectories on the server to set up different htaccess with different rulesets, but how do I consistently, selectively take, for example, segment 3 and move it to segment 1 regardless of how many segments are on the URL?
Thanks!
Mark