2011-07-29 3 views
0

をご覧ください。http://test.shivimpanim.org奇妙な文字 - シンプルなリンクとmod_rewriteの

ビデオ、アクション、ゲームのいずれかをクリック、またはツールの奇妙な文字をURLの最後に追加取得する方法

お知らせ! なぜですか?チャールズにスニッフィング

は私に二リダイレクトの兆候を与えていない...ここで

は私の.htaccessである:ここでは

# 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&p=$1 [NC,L] 
RewriteRule ^action/(.*) /index.php?s=action&p=$1 [NC,L] 
RewriteRule ^games/(.*) /index.php?s=games&p=$1 [NC,L] 
RewriteRule ^tools/(.*) /index.php?s=tools&p=$1 [NC,L] 
RewriteRule ^jplay/(.*) /index.php?s=jplay&p=$1 [NC,L] 
RewriteRule ^contact/(.*) /index.php?s=contact&p=$1 [NC,L] 

は私のindex.phpです:

<?php 
$pageurl = $_REQUEST['p']; 
$section = $_REQUEST['s']; 

include_once('main_top.php'); 

echo($section); 

include_once('main_bottom.php'); 

?> 

ここは私のmain_top.phpです:

<?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; 
    } 
?> 

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8" /> 
     <title></title> 
     <link TYPE="text/css" rel="stylesheet" href="css/common.css" media="all"/> 
     <link TYPE="text/css" rel="stylesheet" href="css/video.css" media="all"/> 
     <link TYPE="text/css" rel="stylesheet" href="css/flexcroll.css" media="all"/> 

     <script type='text/javascript' src="js/flexcroll.js"></script> 
     <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> 
     <script type="text/javascript"> 
      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 
      }; 
     </script> 
     <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e07777b3143e5fb"></script> 
    </head> 
    <body> 
     <ul id="top_menu"> 
      <a href="/"><li id="<?php echo($top_menu_home); ?>"><span>Home</span></li></a> 
      <a href="/store"><li id="<?php echo($top_menu_store); ?>"><span>Store</span></li></a> 
      <a href="/video"><li id="<?php echo($top_menu_video); ?>"><span>Video</span></li></a> 
      <a href="/action"><li id="<?php echo($top_menu_action); ?>"><span>Action</span></li></a> 
      <a href="/games"><li id="<?php echo($top_menu_games); ?>"><span>Games</span></li></a> 
      <a href="/tools"><li id="<?php echo($top_menu_tools); ?>"><span>Tools</span></li></a> 
      <a href="/articles"><li id="<?php echo($top_menu_articles); ?>"><span>Articles</span></li></a> 
      <a href="/jplay"><li id="<?php echo($top_menu_jplay); ?>"><span>jPlay</span></li></a> 
      <a href="/contact"><li id="<?php echo($top_menu_contact); ?>"><span>Contact</span></li></a> 

      <form id="searchform" name="searchform" action="search.php"> 
       <img id="searchglass" src="menu/SEARCHGLASS.png" onclick="searchform.submit();"/> 
       <input type="text" name="query" id="query" value="" /> 
      </form> 
     </ul> 

     <div class="clearfloat">&nbsp;</div> 

     <div id="submenu"> 

      <div id="breadcrumbs" class="breadcrumbs_link"> 
       <a href="#">VIDEO</a> > <a href="#">QUESTIONS & ANSWERS</a> 
      </div> 

      <div class="clearfloat"></div> 

      <div id="social"> 
       <!-- AddThis Button BEGIN --> 
       <div class="addthis_toolbox addthis_default_style "> 
        <a class="addthis_counter addthis_pill_style"></a> 
       </div> 

       <!-- PlusOne Button BEGIN --> 
       <div id="gp-container"> 
        <g:plusone size="small"></g:plusone> 
       </div> 

       <!-- Facebook Button BEGIN --> 
       <iframe src="http://www.facebook.com/plugins/like.php?app_id=147083741996431&amp;href&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=verdana&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe> 
      </div> 
     </div> 

     <div class="clearfloat">&nbsp;</div> 
     <br/>&nbsp;<br/> 

そしてここ

</body> 
</html> 
+0

私は不思議なことは何も見ません。スクリーンショットをつけることはできますか?そして、あなたはどんなブラウザを使っていますか? – Gumbo

+0

私は問題を参照してください。 Windows XP上のFirefox 5.0。 http://test.shivimpanim.org/video#.TjKxmGHw_ng – Devin

+1

私は彼がアンカーを意味すると思う:http://test.shivimpanim.org/video#.TjKyh5eunR0 JavaScriptをオフにすると消える。おそらくaddthis.comの問題ですか? – arnep

答えて

1

代わりの

<a href="/video"><li id="<?php echo($top_menu_video); ?>"><span>Video</span></li></a> 

、このいずれかを試してみてくださいmain_bottom.phpです:

<li id="<?php echo($top_menu_video); ?>"><a href="/video"><span>Video</span></a></li> 

特定のブラウザでは、liタグや入力タグのためにリンクタグが機能しないことがあります。