title: Can't Change PHP Switch Case URL
body: <p>This has been bothering me for awhile. I have some pages on my website that use PHP switch cases to change the content of the page. The problem I'm having is that the URLs for these pages are not very SEO friendly. </p>
  
  <p>I want to change 
  this:</p>
  
  <p><code>http://www.abcprintingink.com/printing.php?page=print-and-mail</code></p>
  
  <p>to this: </p>
  
  <p><code>http://www.abcprintingink.com/printing.php/print-and-mail</code> or better </p>
  
  <p><code>http://www.abcprintingink.com/printing/print-and-mail</code></p>
  
  <p>I've tried .htaccess and nothing works. Here is what I've tried in .htaccess:</p>
  
  <pre><code>RewriteEngine On
  #RewriteRule ^web.php/([^-]*)$ /web.php?page=$1 [QSA]
  
  #RewriteRule ^/web.php/?page\=(.*)$ /web.php?page=$1 [l]
  
  RewriteRule ^web.php/(.*)$ /web.php?page=$1 [l]
  
  RewriteRule ^web.php/([a-zA-Z0-9\-/\.]+)/?$ web.php?page=$1 [L]
  </code></pre>
  
  <p>Other commands in .htaccess work so I know it's not the file or the webserver.</p>
  
  <p>This is the switch statement in printing.php</p>
  
  <pre><code>&lt;?php
          /* SEO Switch Statements */
          $pagename = "printing";
          $page = htmlspecialchars($_GET["page"]);
  
          switch ($page) {
  case 'print-and-mail':
                  $page_title = 'page title';
                  $page_description = 'page desc';
                  $page_nav_active = 'print-and-mail';
                  $page_content_copy = 'page text';
                  $template_slider_image = 'image';
                  break;
  }
  ?&gt;
  </code></pre>
  
  <p>Also, this is the script behind the menus that link the pages.</p>
  
  <pre><code>    &lt;?php $menu=count($navigation); for ($i=0; $i&lt;$menu; $i++) 
  { echo '&lt;div&gt;&lt;li class="navigation"&gt;&lt;a href="?page='.$navigation[$i].'"&gt;'
  .$replaced = str_replace("-", " ", $navigation[$i]).'&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;'; } ?&gt;
  </code></pre>