Parts Catalog Accessories Catalog How To Articles Tech Forums
Call Pelican Parts at 888-280-7799
Shopping Cart Cart | Project List | Order Status | Help




Go Back   PeachParts Mercedes-Benz Forum > General Discussions > Off-Topic Discussion

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 10-25-2005, 09:37 AM
GottaDiesel's Avatar
Banned
 
Join Date: Sep 2003
Location: New Jersey
Posts: 1,564
.htaccess file question

Any chance you folks might know a thing or two about these files?


I have a few search engine results in msn.com that look like this (for example):

http://www.domain.com/shipping.php?...8ekfd87325hjd87

I have some code in my .htaccess file that is suppose to tell the search engine spiders that come in from a link like that to visit a link that looks like this (and remember the one with the session id (osCsid):

www.domain.com/shipping.php

With that being said, here is the htaccess file that has code that is suppose to do that. My purpose in the post is to find out if this is good or not and what the downsides (if any are) to doing this.


# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
#
# AllowOverride Options
#

#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers



SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0



# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

#
# php_value session.use_trans_sid 0
# php_value register_globals 1
#

#
#
#
# Spider Fix Added below
#
#
#
# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

# Set some options
Options -Indexes
Options FollowSymLinks

RewriteEngine on
RewriteBase /
#
# Skip the next two rewriterules if NOT a spider
RewriteCond %{HTTP_USER_AGENT} !(msnbot|slurp|googlebot) [NC]
RewriteRule .* - [S=2]
#
# case: leading and trailing parameters
RewriteCond %{QUERY_STRING} ^(.+)&osCsid=[0-9a-z]+&(.+)$ [NC]
RewriteRule (.*) $1?%1&%2 [R=301,L]
#
# case: leading-only, trailing-only or no additional parameters
RewriteCond %{QUERY_STRING} ^(.+)&osCsid=[0-9a-z]+$|^osCsid=[0-9a-z]+&?(.*)$ [NC]
RewriteRule (.*) $1?%1 [R=301,L]

#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
#
# AllowOverride Options
#

#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers



SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0



# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

#
# php_value session.use_trans_sid 0
# php_value register_globals 1
#
Reply With Quote
  #2  
Old 10-26-2005, 11:13 AM
CMuc's Avatar
mucman
 
Join Date: Jul 1999
Location: Port Coquitlam BC, Can
Posts: 92
This is what my brother said:


"He needs to post the full URLs that he is seeing in the MSN
search results. I'm guessing the regexes aren't catching certain
exceptions. Also, he is only handling 3 different spiders. Also,
the user agents might not match because of case sensitivity. Anyways,
it's impossible to say what the problem is since he never posted
the actual URLs he is witnessing in the search results."
__________________
Chris Muc

'87 300E 430,000 km

"You can fight without ever winning
But never ever win without a fight"

Neil Peart
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0
Copyright 2018 Pelican Parts, LLC - Posts may be archived for display on the Peach Parts or Pelican Parts Website -    DMCA Registered Agent Contact Page