title: Mod Rewrite question with regex's
body: <p>Im trying to do this sort of rewrite that only affects some urls to make them go to anchors.</p>
  
  <p>So if I see this request:</p>
  
  <pre><code>/somedir/trigger/something
  </code></pre>
  
  <p>I want to transform it to this request. I can guarantee there will be no slash after the trigger. The "something" part is going to be a alpha-numeric string every time. The "trigger" part is also alpha-numeric only, but I have multiple values for trigger. The "result" part is a constant alpha-numeric string that will never change.</p>
  
  <pre><code>/somedir/result#something
  </code></pre>
  
  <p>and the trigger can be maybe 4 or 5 different strings, but the result will always be the same. So I tried this:</p>
  
  <pre><code>RewriteRule ^/somedir/(type1|type2|type3|type4)/(.*)$ /somedir/result#$2
  </code></pre>
  
  <p>i thought $1 would be the type it catches, and $2 to be the thing i want to find and stick at the end. This doesnt work though, and if anyone knows how to do this right that would help me out</p>