homepage Welcome to WebmasterWorld Guest from 54.161.192.130
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
traffic drop after underscore to dashes change
traffic drop after underscore to dashes change
spok



 
Msg#: 4307675 posted 8:32 am on May 4, 2011 (gmt 0)

Hello,
I have made the change from underscores to dashes [_ => -]
via external file.
thsi is the rule:

RewriteCond %{THE_REQUEST} (application|product) [NC]
RewriteRule ^([^_]+)_ /underscores.php [L]

and the external file:
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$pageURL = curPageURL();
$newURL = str_replace('_','-',$pageURL);
$RedirectionUrl = $newURL;
header("HTTP/1.1 301 Moved Permanently");
header("Location: $RedirectionUrl");

I have noticed a traffic drop. The sitemap has stayed as it was (with underscores) so spiders can find the new address.
Can you please tell me what did I do wrong? Or is this temporary?
thx,

spok

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4307675 posted 12:32 pm on May 4, 2011 (gmt 0)

It is temporary. Make sure that no request can ever result in a multiple-step redirection chain.

Update your sitemap as soon as possible. The sitemap should include valid URLs, not URLs that redirect.

spok



 
Msg#: 4307675 posted 3:00 pm on May 4, 2011 (gmt 0)

thx g1smd,
question: if I change sitemap and all links on page, the spiders will see only new pages and will not connect new links with old links (underscores vs dashes). Or the steps are change urls and sitemaps, keep web as it was?
thank you

spok

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved