Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-05-2009, 11:34 AM   #1 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 1,027
iTrader: 1 / 100%
searchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to behold
Exclamation Help with web.config file please!!!

Here's the background to my problem:
Google Webmaster Tools is showing half of my pages as duplicate content because it counts CAPS in urls as differnet content then the same url with lowercase text. My site only links to pages in lower case, so it must be from external links. For example:
...com/SEO-Tools/somepage.asp is showing as duplicate content to ...com/seo-tools/somepage.asp

I am trying to set up 301 redirects to the lowercase versions using my web.config file.

Here is the problem:
I added the following rewrite module for IIS7 to the web.config:
Code:
<rewrite> <rules> <rule name="Convert to lowercase" stopProcessing="true"> <match url="[A-Z]" ignoreCase="false" /> <action type="Redirect" url="{ToLower:{R:0}}" redirectType="Permanent" /> </rule> </rules> </rewrite>
Now when I go to ...com/SEO-Tools/somepage.asp it redirects to ...com/s and I get a 404 error, so it is only changing the first capital letter to lowercase and nothing else.
It may be the regular expression, but this is all I could fine online as an example for doing this. Any help would be greatly appreciated! Thanks.
John
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-05-2009, 02:10 PM   #2 (permalink)
v7n Mentor
 
searchbliss's Avatar
 
Join Date: 03-25-06
Posts: 1,027
iTrader: 1 / 100%
searchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to beholdsearchbliss is a splendid one to behold
Problem solved! I changed the regular expression pattern to
".*[A-Z].*"
searchbliss is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-05-2009, 03:17 PM   #3 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,338
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Glad you found the fix.

Just for more clarification, the reason Google does is because *NIX servers DO CARE about case and in your case, those would be two different folders. But, Windows servers do not care.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing php config without access to main frame... .htacess? sub php.ini? 2939195631902 Web Design Lobby 1 02-26-2009 10:04 AM
How do you find the price for such config? DennisBerc Dedicated Servers 6 04-04-2008 02:33 AM
PHP script config problem Optix Coding Forum 5 04-29-2007 06:18 AM
Cent Os Firewall Config Albert Tai Dedicated Servers 5 01-04-2007 05:26 AM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:52 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.