|
|
|
#1
|
||||
|
||||
.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 # |
#2
|
||||
|
||||
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 |
Bookmarks |
|
|