title: How can I hide my URL parameter using .htaccess
body: <p>So this is my htaccess file as Wordpress supplies it</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  # END WordPress
  </code></pre>
  
  <p>I have a page at /events, that I want to add a block of text via a template PHP file, depending on if a URL parameter exists.</p>
  
  <p>So I took a look online, and tried to write an .htaccess rule for it. What I came up with was this</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^events/([^/\.]+)/?$ events/?flow=$1 [L]
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  # END WordPress
  </code></pre>
  
  <p>However, I don't think this is working how I'd like it to. The link from the original page is /events?flow=open-evenings and in the events page, I have the usual $_GET thing:</p>
  
  <pre><code>$flow = isset($_GET['flow']) ? $_GET['flow'] : '';
  if($flow == 'open-evenings') { echo "blah"; }
  </code></pre>
  
  <p>But when I try to view the URL /events/open-evenings I get the 404 error page. Have I placed the rule in the wrong place, or am I not doing something obvious? All help is appreciated!</p>
  
  <p><strong>Update</strong>: this is using Wordpress, so maybe i shouldn't be using the already rewritten urls? Should I be using index.php instead? But will that still pickup the pretty urls that I'm trying to use?</p>
  
  <p>I've tried to change the URL to index.php, to try and get that to work, but with the below rule, I'm still getting a 404 page.</p>
  
  <pre><code>RewriteRule ^events/([^/]*)$ /index.php?flow=$1
  </code></pre>
  
  <p>Can anyone help me try to get this working? </p>