Reply
Help with web.config file please!!!
Old 07-05-2009, 02:36 PM Help with web.config file please!!!
kline11's Avatar
Small fish in a big pond

Posts: 1,371
Name: John
Location: USA
Trades: 0
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 Web Tools | Destiny
kline11 is offline
Reply With Quote
View Public Profile Visit kline11's homepage!
 
 
When You Register, These Ads Go Away!
Old 07-05-2009, 05:10 PM Re: Help with web.config file please!!!
kline11's Avatar
Small fish in a big pond

Posts: 1,371
Name: John
Location: USA
Trades: 0
Problem solved! I changed the regular expression pattern to
".*[A-Z].*"
__________________
SearchBliss Web Tools | Destiny
kline11 is offline
Reply With Quote
View Public Profile Visit kline11's homepage!
 
Reply     « Reply to Help with web.config file please!!!
 

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10297 seconds with 13 queries