title: URL encode in htaccess, maybe?
body: <p>Consider the following scenario:</p>
  
  <p>I want to be able to access <code>http://www.example.com/word/hello/</code>, where the word <code>hello</code> is variable. So I set up <code>.htaccess</code> to configure that.</p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^word/(.+)/?$ displayword.php?word=$1 [L]
  </code></pre>
  
  <p>I used <code>.+</code> because I also want to filter any symbols such as <code>?+-.!;:</code> etc.</p>
  
  <p>And I set up my PHP file accordingly:</p>
  
  <pre><code>&lt;?php
  echo $_GET['word'];
  ?&gt;
  </code></pre>
  
  <p>Remember that this is just a scenario. Now, I went to this URL: <code>http://www.example.com/word/Are you ok?/</code>, and the page outputted this:</p>
  
  <pre><code>Are you ok
  </code></pre>
  
  <p>And I couldn't figure out why. But then I realised that the question mark symbol is the starting point of the URL variables.</p>
  
  <p>So is there a way to 'url encode' the question mark in the above example, in order for it to be displayed correctly?</p>