Conditional .htaccess RewriteRule parameter?

I think it should be two rules, but they shouldn't do the same thing. The following is untested, but hopefully the intention is clear, if it doesn't work "out-of-the-box": RewriteRule ^(embed/)? Something/(\d+)/start$ /index.

Php? Ix=$2 RewriteRule ^embed/(.*) $1&fEmbed=1 I'm assuming "/start" is always at the end of the URL. If not then it's a bit more difficult EDIT: Reading Vegard's comment I'm thinking that maybe it can be handled by swapping the rules: RewriteRule ^embed/(.*) $1&fEmbed=1 RewriteRule ^something/(\d+)/start /index.

Php? Ix=$1 But still, it depends on real-world applications if this will work or not.

I think it should be two rules, but they shouldn't do the same thing. The following is untested, but hopefully the intention is clear, if it doesn't work "out-of-the-box": RewriteRule ^(embed/)? Something/(\d+)/start$ /index.

Php? Ix=$2 RewriteRule ^embed/(.*) $1&fEmbed=1 I'm assuming "/start" is always at the end of the URL. If not then it's a bit more difficult.

EDIT: Reading Vegard's comment I'm thinking that maybe it can be handled by swapping the rules: RewriteRule ^embed/(.*) $1&fEmbed=1 RewriteRule ^something/(\d+)/start /index. Php? Ix=$1 But still, it depends on real-world applications if this will work or not.

The rules don't always end in start, and have more parameters than those shown. However, the idea is good, and I will experiment with it. – Vegard Larsen Dec 23 '08 at 10:57.

Index. Php? IxQuiz=$1&fStart=1$2 RewriteRule ^embed/(.*) $1&fEmbed=1 Not very, pretty, but it works.

I can now have multiple rules that start with "something/", and all of them are prefixable by using "embed/".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions