title: Strange characters in url - simple link and mod_rewrite
body: <p>Please see: <a href="http://test.shivimpanim.org" rel="nofollow">http://test.shivimpanim.org</a></p>
  
  <p>Click on any of Video, Action, Games, or Tools</p>
  
  <p>Notice how strange characters get appended to the end of the url! <strong>Why is that?</strong></p>
  
  <p>Sniffing in Charles give me no indication of a secondary redirect...</p>
  
  <p><strong>Here is my .htaccess:</strong></p>
  
  <pre><code># Set up mod_rewrite
  Options +FollowSymLinks
  RewriteEngine on
  #
  # Rules follow
  
  RewriteBase /
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)/$ $1 [R,L]
  
  # Here we simply remap the name if it doesn't exist as a file or directory
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteRule ^video$ /index.php?s=video [NC,L]
  RewriteRule ^action$ /index.php?s=action [NC,L]
  RewriteRule ^games$ /index.php?s=games [NC,L]
  RewriteRule ^tools$ /index.php?s=tools [NC,L]
  RewriteRule ^jplay$ /index.php?s=jplay [NC,L]
  RewriteRule ^contact$ /index.php?s=contact [NC,L]
  
  RewriteRule ^video/(.*) /index.php?s=video&amp;p=$1 [NC,L]
  RewriteRule ^action/(.*) /index.php?s=action&amp;p=$1 [NC,L]
  RewriteRule ^games/(.*) /index.php?s=games&amp;p=$1 [NC,L]
  RewriteRule ^tools/(.*) /index.php?s=tools&amp;p=$1 [NC,L]
  RewriteRule ^jplay/(.*) /index.php?s=jplay&amp;p=$1 [NC,L]
  RewriteRule ^contact/(.*) /index.php?s=contact&amp;p=$1 [NC,L]
  </code></pre>
  
  <p><strong>Here is my index.php:</strong></p>
  
  <pre><code>&lt;?php
  $pageurl = $_REQUEST['p'];
  $section = $_REQUEST['s'];
  
  include_once('main_top.php');
  
  echo($section);
  
  include_once('main_bottom.php');
  
  ?&gt;
  </code></pre>
  
  <p><strong>Here is my main_top.php:</strong></p>
  
  <pre><code>&lt;?php 
      $top_menu_home = 'top_menu_home';
      $top_menu_store = 'top_menu_store';
      $top_menu_video = 'top_menu_video';
      $top_menu_action = 'top_menu_action';
      $top_menu_games = 'top_menu_games';
      $top_menu_tools = 'top_menu_tools';
      $top_menu_articles = 'top_menu_articles';
      $top_menu_jplay = 'top_menu_jplay';
      $top_menu_contact = 'top_menu_contact';
  
      switch($section) {
          case 'store': $top_menu_store .= '_selected'; break;
          case 'video': $top_menu_video .= '_selected'; break;
          case 'action': $top_menu_action .= '_selected'; break;
          case 'games': $top_menu_games .= '_selected'; break;
          case 'tools': $top_menu_tools .= '_selected'; break;
          case 'articles': $top_menu_articles .= '_selected'; break;
          case 'jplay':   $top_menu_jplay .= '_selected'; break;
          case 'contact': $top_menu_contact .= '_selected'; break;
          default: $top_menu_home .= '_selected'; break;
      }
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8" /&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;link TYPE="text/css" rel="stylesheet" href="css/common.css" media="all"/&gt;
          &lt;link TYPE="text/css" rel="stylesheet" href="css/video.css" media="all"/&gt;
          &lt;link TYPE="text/css" rel="stylesheet" href="css/flexcroll.css" media="all"/&gt;
  
          &lt;script type='text/javascript' src="js/flexcroll.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="https://apis.google.com/js/plusone.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              var addthis_config = {
                  data_track_clickback:true,
                  data_track_addressbar:true,
                  services_compact: "twitter, email, facebook, google, stumbleupon, digg, more",
                  services_exclude: "print",
                  ui_offset_left: -300
              };
          &lt;/script&gt;
          &lt;script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e07777b3143e5fb"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;ul id="top_menu"&gt;
              &lt;a href="/"&gt;&lt;li id="&lt;?php echo($top_menu_home); ?&gt;"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/store"&gt;&lt;li id="&lt;?php echo($top_menu_store); ?&gt;"&gt;&lt;span&gt;Store&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/video"&gt;&lt;li id="&lt;?php echo($top_menu_video); ?&gt;"&gt;&lt;span&gt;Video&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/action"&gt;&lt;li id="&lt;?php echo($top_menu_action); ?&gt;"&gt;&lt;span&gt;Action&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/games"&gt;&lt;li id="&lt;?php echo($top_menu_games); ?&gt;"&gt;&lt;span&gt;Games&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/tools"&gt;&lt;li id="&lt;?php echo($top_menu_tools); ?&gt;"&gt;&lt;span&gt;Tools&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/articles"&gt;&lt;li id="&lt;?php echo($top_menu_articles); ?&gt;"&gt;&lt;span&gt;Articles&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/jplay"&gt;&lt;li id="&lt;?php echo($top_menu_jplay); ?&gt;"&gt;&lt;span&gt;jPlay&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
              &lt;a href="/contact"&gt;&lt;li id="&lt;?php echo($top_menu_contact); ?&gt;"&gt;&lt;span&gt;Contact&lt;/span&gt;&lt;/li&gt;&lt;/a&gt;
  
              &lt;form id="searchform" name="searchform" action="search.php"&gt;
                  &lt;img id="searchglass" src="menu/SEARCHGLASS.png" onclick="searchform.submit();"/&gt;
                  &lt;input type="text" name="query" id="query" value="" /&gt;
              &lt;/form&gt;
          &lt;/ul&gt;
  
          &lt;div class="clearfloat"&gt;&amp;nbsp;&lt;/div&gt;
  
          &lt;div id="submenu"&gt;
  
              &lt;div id="breadcrumbs" class="breadcrumbs_link"&gt;
                  &lt;a href="#"&gt;VIDEO&lt;/a&gt; &gt; &lt;a href="#"&gt;QUESTIONS &amp; ANSWERS&lt;/a&gt;
              &lt;/div&gt;
  
              &lt;div class="clearfloat"&gt;&lt;/div&gt;
  
              &lt;div id="social"&gt;
                  &lt;!-- AddThis Button BEGIN --&gt;
                  &lt;div class="addthis_toolbox addthis_default_style "&gt;
                      &lt;a class="addthis_counter addthis_pill_style"&gt;&lt;/a&gt;
                  &lt;/div&gt;
  
                  &lt;!-- PlusOne Button BEGIN --&gt;
                  &lt;div id="gp-container"&gt;
                      &lt;g:plusone size="small"&gt;&lt;/g:plusone&gt;
                  &lt;/div&gt;
  
                  &lt;!-- Facebook Button BEGIN --&gt;
                  &lt;iframe src="http://www.facebook.com/plugins/like.php?app_id=147083741996431&amp;amp;href&amp;amp;send=false&amp;amp;layout=button_count&amp;amp;width=90&amp;amp;show_faces=false&amp;amp;action=like&amp;amp;colorscheme=light&amp;amp;font=verdana&amp;amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"&gt;&lt;/iframe&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="clearfloat"&gt;&amp;nbsp;&lt;/div&gt;
          &lt;br/&gt;&amp;nbsp;&lt;br/&gt;
  </code></pre>
  
  <p><strong>And here is main_bottom.php</strong></p>
  
  <pre><code>&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>