LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-18-2006, 09:10 PM   #1
grayram
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Fedora Core 5
Posts: 35

Rep: Reputation: 15
MOD Rewrite hurting my SEO... whatduh!?


WHAT WE DID
-------------
I recently integrated MOD rewrite to our site and I think it's working great on our links, being able to customize how our links will appear in the pages adding as much keywords as we want.

This is an excerpt of what our .htaccess contains
Code:
RewriteEngine on

RewriteRule ^(.*)\.htm$				 												/index.php?target=$1

RewriteRule ^sterling-silver-accessory/rss\.xml$									/rss/rss.xml

RewriteRule ^sterling-silver-jewelry/silver-(.*)/cv-(.*)\.html$						/index.php?target=products&action=cat_view&cid=$2
RewriteRule ^sterling-silver-jewelry/silver-(.*)/pvc-(.*)-(.*)\.html$


WHAT MOD REWRITE DID
--------------------
I decided to view the HTML codes generated by our pages and... whalllah! The codes now show:

[HTML]<HTML>
<HEAD>
<TITLE>williamwalles.net</TITLE>
<script language="javascript"><!--begin hiding
function Clear() {
self.status="";
setTimeout("Clear()",10); }
Clear();
//end hiding --></script>
</HEAD>
<FRAMESET ROWS="*,0" FRAMEBORDER="0" BORDER="0" FRAMESPACING="0">
<FRAME src="index.php" noresize>
<NOFRAMES>
<BODY>
<p>&nbsp;</p>
<p align="center"><a href="index.php"><b>Click Here To Enter</b></a></p>
</BODY>
</NOFRAMES>
</FRAMESET>
</HTML>[/HTML]

Yeah, right. Instead of helping us boost our page ranking, MOD rewrite took all our codes and put it in a frame. Furthermore, it has hidden even the link on the statusbar. Ha ha ha! NOT FUNNY!!!!

Does anyone know how I can make our HTML contents show up again while using the very handy, friendly and always-lending-a-helping-hand MOD rewrite?

Thanks guys!

Last edited by grayram; 06-18-2006 at 09:27 PM.
 
Old 06-20-2006, 06:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,372
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Mod_rewrite doesn't know concepts like frames or Javascript or "hiding" stuff.
For a fix to your problem look elsewhere, prolly at what renders the code.
 
Old 06-20-2006, 07:05 AM   #3
Spudley
Member
 
Registered: Mar 2003
Location: Berkshire, England.
Distribution: SuSE 10.0
Posts: 299

Rep: Reputation: 32
I can tell you I'm using mod_rewrite extensively, and it certainly doesn't do what you've described. (it would break all my images for a start if it did that)

My guess is that your index.php page includes some frame code, or something like that, but of course it's not easy to tell for sure what it's doing without seeing it. Try searching through your code for that frame code, see where it's coming from (and you can be pretty certain it definitely is coming from your code); when you find it, it ought to give you a clue as to what's going on.

You might want to edit your rewrites to have [L] on the end; the [L] is for 'last', and means "when you've rewritten this, don't do any more rewrites. If you don't have [L], it will carry on doing one rewrite, then the next, then the next, so it's possible that you think it's doing one thing, but in fact it's carrying on and doing something different further down the rewrite script.

Hope that helps
 
Old 06-20-2006, 07:39 AM   #4
grayram
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Fedora Core 5
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for the reply guys!

My index page does not contain frames nor the other pages. Until now I'm not sure why this happens. Any other reasons why do you this is happening to our site?

BTW, here is the code to my index.php:

Code:
<? 
require_once 'config.inc.php';
require_once 'lib/grayram.lib.php';
require_once 'lib/db.lib.php';
require_once 'lib/funcs.lib.php';
require_once 'vars.inc.php';
require_once 'cron-rss.php';
require_once 'hit-logger.php';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" CONTENT="jp">
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

<title><?=$pgtitle?></title>
<meta name="description" content="$productcode $desckw | William Walles - $category $product">
<meta name="keywords" content="$category, $productcode, $dbkw">
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss/rss.xml">
<style type="text/css">
<!--
@import url("/styles.css");
-->
</style>
<?require_once 'scripts.js';?>
</head>

<body>
<table width="815"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr align="right" valign="bottom" bgcolor="#000000" style="background-image:url(/images/header.jpg); background-repeat:no-repeat">
    <td width="815" height="99" colspan="3">
	<table width="400"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="right" valign="bottom"><table width="300"  border="0" align="right" cellpadding="0" cellspacing="0">
          <tr>
              <td align="right">
                <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                  <tr align="right" valign="middle">
                    <td width="88%"><a href="/sterling-silver-accessory/rss.xml" target="_blank" id="link-white"><img src="/images/rss.gif" width="16" height="16" border="0"> </a></td>
                    </tr>
                </table>
</td>
              <td rowspan="3" align="right"><img src="/images/spacer.gif" width="10" height="20"></td>
          </tr>
          <tr>
            <td align="right">
				<form action="/search-by-keyword" method="post">
					<input name="f_search" type="text" class="bar" size="30" >
					<input type="submit" name="Submit" value="search"><br> 
				</form>	
				<div id="link-white" align="right" style="padding-top:3px">
				<a href="/advanced-search">advanced search</a>
				</div>
			</td>
            </tr>
          <tr>
            <td height="20" align="right">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td bgcolor="#646464" style="padding-left:5px ">
	<div id="navTop"><a href="/" title="Home">ホーム</a></div>
	</td>
    <td colspan="2" valign="top" bgcolor="#C0C0C0">
	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="35%" colspan="18" bgcolor="#797979">
				<div id="navTop">
					<a href="/about-us.htm" title="About us">会社紹介</a>
					<a href="/news.htm" title="News and Events">お知らせ</a>
					<a href="/sterling-silver-jewelry/new-collections.html" title="New collections">ニューデザイン</a>
					<a href="/gallery.htm" title="Image Gallery">ギャラリー</a>
					<a href="/faq.htm" title="Frequently Asked Questions">FAQ</a>
					<a href="/contact-us.htm" title="Contact us">メール</a>
					<a href="/affiliates.htm" title="Affiliate">アフィリエイト関連サイト</a>
				</div>		
		  </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td valign="top" bgcolor="#C0C0C0"><table width="100%"  border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td class="left_white2" style="padding:0px "><img src="/images/curves.gif" width="142" height="28"></td>
      </tr>
      <tr>
        <td class="left_white2" style="padding:0px "><?require "menu.php"?></td>
      </tr>
	  
	  <!--
      <tr>
        <td class="left_white2">Weddings</td>
      </tr>
      <tr>
        <td class="left_white3" style="padding-left:10px">bangles<br>
      bracelets<br>
      brooches<br>
      buttons<br>
      chokers<br>
      earrings<br>
      hairclips<br>
      heisha<br>
      bangles</td>
      </tr>
      <tr>
        <td class="left_white2">Baptismal</td>
      </tr>
      <tr>
        <td class="left_white3">bangles<br>
      bracelets<br>
      brooches<br>
      buttons<br>
      chokers<br>
      earrings<br>
      hairclips<br>
      heisha<br>
      bangles</td>
      </tr>
      <tr>
        <td class="left_white2">Anniversary</td>
      </tr>
      <tr>
        <td><span class="left_white3">chokers<br>
      earrings<br>
      hairclips</span><br></td>
      </tr>
	  -->
    </table>
	</td>
    <td width="700" valign="top">
	<table width="100%"  border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td>          <? require "$target.php" ?>
          <img src="images/spacer.gif" width="500" height="2" /></td>
      </tr>
    </table></td>
    <td valign="top" style="padding-top:10px">
      <? if(!$log_username)  { ?>	
      <form action="/index.php?target=users&action=login_valid8" method="post">
	<table width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#8E8E8E">
      <tr bgcolor="#3e4241">
        <td colspan="2" class="left_white" style="padding:5px; font-weight: bold;">Client Login </td>
      </tr>
      <tr valign="top">
        <td style="font-size:10px; color:#FFFFFF; padding-left:6px">Username:            </td>
        <td align="left" style="font-size:10px; color:#FFFFFF; padding-left:6px"><input name="f_username" type="text" class="bar" id="f_username" size="25"></td>
      </tr>
      <tr>
        <td style="font-size:10px; color:#FFFFFF; padding-left:6px">Password:            </td>
        <td align="left" style="font-size:10px; color:#FFFFFF; padding-left:6px"><input name="f_password" type="password" class="bar" id="f_password" size="25"></td>
      </tr>
      <tr>
        <td width="53" class="white" style=" padding-left:6px"><font face="Courier New, Courier, mono"></font>
          <input name="Submit" type="submit" id="Submit" value="Login"></td>
        <td width="111" align="left" style="font-size:10px; color:#FFFFFF;"> <a href="/register-new-user-buyer-client-customer-registration-signup">register</a> <br>
            <a href="/forgot-recover-retrieve-user-customer-client-password-access">forget password?</a>
		</td>
      </tr>
    </table>
	</form>
    <? } else { ?>
	<table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#8E8E8E">
      <tr align="center" bgcolor="#3e4241">
        <td colspan="2" align="left" class="white"><strong> &nbsp;&nbsp;Welcome <?=$log_username?>!</strong>
		</td>
      </tr>
      <tr>
        <td align="center">
		<img src="/images/user2.png" width="22" height="22"></td>
        <td width="133" id="link-white"><a href="/index.php?target=users&action=user_view">My Account </a></td>
      </tr>

	  <? if($log_access == '2') { ?>
      <tr>
        <td align="center"><img src="/images/user2.png" width="22" height="22" /></td>
        <td id="link-white"><a href="/_admin">Administration</a></td>
      </tr>
	  <? } ?>
	  
      <tr>
        <td align="center"><img src="/images/cart.png" width="22" height="22"></td>
        <td id="link-white">
		<form name="frmPaypal" target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
			<input type="hidden" name="cmd" value="_cart">
			<input type="hidden" name="business" value="mmsilver10001@yahoo.com">
			<!--<input name="submit" type="image" src="/images/cart.png" width="100" height="21" border="0">-->
			<a href="#" onClick="document.frmPaypal.submit()">Shopping Cart</a>
			<input type="hidden" name="display" value="1">
		</form>
		</td>
		</tr>
      <tr>
        <td align="center"><img src="/images/logout.png" width="22" height="22"></td>
        <td id="link-white"><a href="/index.php?target=users&action=logout">Logout</a></td>
		</tr>
    </table>
	<? } ?>
	  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center"><img src="/images/spacer.gif" width="100" height="5"></td>
        </tr>
        <tr>
          <td align="center" bgcolor="#3E4241"><a href="/craftysyntax/livehelp.php" target="_blank"><img src="/images/support.gif" alt="ここをクリックしてください。" width="173" height="110" border="0"></a></td>
        </tr>
      </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0"> 
        <tr>
          <td align="center"><img src="/images/spacer.gif" width="100" height="5"></td>
        </tr>
        <tr>
          <td align="center"><table width="100%"  border="0" cellspacing="0" cellpadding="3">
              <tr>
                <td colspan="2" align="center" bgcolor="#666666" class="white">
				  <?
				  $spl = dbGather('ww_specials','*',"ORDER BY year, month DESC LIMIT 1");
				  
				  foreach($spl[0] as $key => $value) {
				  		$key = "spl_$key";
						$$key = $value;
				  }
				  ?>
				  This Month's Featured Collection:<br>
                  <strong><a href="/monthly-specials/<?=$spl_title?>/msv-<?=$spl_id?>.html"><?=$spl_title?></a></strong>
			    </td>
              </tr>
              <tr>
                <td colspan="2" align="center" bgcolor="#666666" class="white"><a href="/monthly-specials/<?=$spl_title?>/msv-<?=$spl_id?>.html"><img src="/images/specials/<?=$spl_image?>" width="166" border="0"></a></td>
              </tr>
              <tr>
                <td colspan="2" align="center" bgcolor="#666666" id="link-white"><a href="index.php?target=newsletter&action=activate">Click here to receive our Monthly Specials </a></td>
              </tr>
              <tr bgcolor="#666666">
                <td height="40" colspan="2" align="center">
				<form action="/sterling-silver-jewelry/monthly-specials.html" method="post">
					<input type="submit" name="Submit" value="View All Monthly Specials">
				</form>
				</td>
              </tr>
              <tr>
                <td colspan="2" align="center"><img src="/images/spacer.gif" width="100" height="5"></td>
              </tr>
			  
			  <form action="/index.php?target=tellurfrendz" method="post">
              <tr align="center" bgcolor="#2E2E2E">
                <td height="18" colspan="2" align="left" class="white"><img src="/images/tellfriends.gif" width="174" height="60"></td>
              </tr>
              <tr align="center" valign="top" bgcolor="#8E8E8E">
                <td height="16" align="left" class="white">Your Name </td>
                <td align="left" class="white"><input name="f_myname" type="text" id="f_myname" value="<?="$log_firstname $log_lastname"?>" size="14"></td>
              </tr>
              <tr align="center" valign="top" bgcolor="#8E8E8E">
                <td width="41%" height="16" align="left" class="white">Your Email </td>
                <td width="59%" align="left" class="white">                  <input name="f_myemail" type="text" id="f_myemail" value="<?=$log_email?>" size="14"></td>
                </tr>
              <tr align="center" valign="top" bgcolor="#8E8E8E">
                <td height="16" align="left" class="white">Friend's Name </td>
                <td align="left" class="white"><input name="f_friendname" type="text" id="f_friendname" size="14"></td>
              </tr>
              <tr align="center" valign="top" bgcolor="#8E8E8E">
                <td height="16" align="left" class="white">Friend's Email </td>
                <td align="left" class="white"><input name="f_friendemail" type="text" id="f_friendemail" size="14"></td>
              </tr>
              <tr align="center" valign="top" bgcolor="#8E8E8E">
                <td height="16" align="left" class="white">Message</td>
                <td align="right" class="white">&nbsp;</td>
              </tr>
              <tr align="left" valign="top" bgcolor="#8E8E8E">
                <td height="16" colspan="2" class="white"><textarea name="f_message" cols="30" rows="5" id="f_message">Check out this site!</textarea></td>
              </tr>
              <tr align="center" bgcolor="#8E8E8E">
                <td height="16" colspan="2" align="left" class="white"><input name="Submit4" type="submit" id="Submit2" value="Submit"></td>
              </tr>
			  </form>
          </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="108" colspan="3" valign="top">&nbsp;</td>
  </tr>
  <tr align="center">
    <td colspan="3" valign="top"><a href="index.php"><img name="index_r15_c8" src="/images/footerlogo.gif" width="211" height="50" border="0" alt=""></a></td>
  </tr>
  <tr align="center" bgcolor="#E4E4E4">
    <td colspan="3" valign="top">
	<form action="/index.php?target=search" method="post">
	<table width="500" border="0" cellspacing="0" cellpadding="4">
      <tr>
        <td width="337" align="right">
		<input name="f_search" type="text" id="f_search" size="25">
        <input name="Submit" type="submit" id="Submit" value="search">
		</td>
        <td width="147"><a href="index.php?target=search&action=adv_form">advanced search </a></td>
      </tr>
    </table>
	</form>
	</td>
  </tr>
  <tr align="center">
    <td colspan="3" valign="top"><img src="/images/footerspacer.gif" width="815" height="4"></td>
  </tr>
  <tr align="center">
    <td colspan="3" valign="top"><p>
		<a href="#">Security policy</a> | 
		<a href="#">Privacy Policy</a> | 
		<a href="#">発送についての条件</a> | 
		<a href="#">Terms of Use</a> | 
		<a href="index.php?target=qa">Q&amp;A</a>
		
		</p>
      <p>COPYRIGHT &copy; <?=date('Y',time())?> 
        <a href="index.php"><?=strtoupper(SITE_NAME)?></a>. ALL RIGHTS RESERVED</p></td>
  </tr>
</table>
</body>
</html>

<script language="javascript">
	document.title = '<?=$pgtitle?>';
</script>

Last edited by grayram; 06-20-2006 at 07:41 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception in mod-rewrite rule Boby Programming 0 01-17-2006 07:40 PM
emerge sync is hurting me! Radical_Dreamer Linux - Software 11 08-24-2005 11:07 PM
compile apache source rpm with mod rewrite robertngo Linux - Software 3 07-21-2005 03:44 AM
Mod Rewrite Help carminejg3 Linux - Software 0 12-20-2004 05:19 PM
apache mod rewrite Robert0380 Linux - Software 5 07-31-2003 04:42 PM


All times are GMT -5. The time now is 03:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration