Sharepoint SEO - How to lowercase urls with rewrite rules?
-
We have a borked website running on sharepoint IIS .net that has been at the mercy of many bad developers
We have rewrite rules with an ini file for 301s etc. We are struggling to find out or figure out how to lowercase them
The lowercase functionality may be native within sharepoint somewhere
Any help appreciated! Sorry its so vague
S
-
Here's how to achieve what you need through an IIS URL Rewrite:
<rewrite><rules><rule name="ForceLowercase" stopprocessing="false"><match url=".[A-Z]." ignorecase="false"><action type="Redirect" redirecttype="Permanent" url="{ToLower:{R:0}}"></action></match></rule></rules></rewrite>
Translation: If the URL contains any uppercase letters, convert it to all lowercase, then continue processing other rules. (You can name the rule whatever you want.)
These rewrite rules are stored either in the ApplicationHost.config file or in Web.config files. More info and step-by step instructions: creating IIS URL Rewrites.
Note: Compared to the [ISAPI_Rewrite] filters (httpd.ini), I've found that the IIS URL Rewrite (web.config) rules seem to match the syntax of Apache more often. As a result, it's easier to find RegEx expressions already written for what you need. It also helps to focus on debugging the actual code versus some strange IIS exception. Good luck!
-
Hi Stephen,
I'm going back through the older unanswered questions. Did you ever get this figured out? Can you share a solution with us for the archives if you did?
-
Hi Stephen
Below are some URL's I happened across today when looking for something related.
http://www.cto20.com/post/Tips-Tricks-3-URL-Rewriting-Rules-Everyone-Should-Use.aspx
http://searchengineland.com/url-rewrites-and-redirects-part1-16574
http://searchengineland.com/url-rewrites-and-redirects-part2-16575Not 100% sure they will help but thought I would pass them on in case they did.
-
a lot of rewrites use similar rules. not sure if this will help but:
http://www.isapirewrite.com/docs/ -
Some update from the dev
We’re using IIS6 and Ionic Isapi filter
There are some instruction I found on a forum that do the lowercase redirect
Finally, downcase as necessary. If there are any
uppercase characters in the URL, apply this rule.
RewriteCond %{url} [A-Z]+
RedirectRule ^(.*)$ #L$1#E [R=301]
Will feedback if it works
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Technical SEO - Where to begin?
Hi all, I'm looking to learn more about technical SEO. My background was digital marketing/PR where I learned the importance of links, of anchor text, of page speed, of improving UX signals, of SSL, utilising things like Google My Business etc. However, I find I am chasing my tail when it comes to things like understanding JS/CSS/log file analysis etc. I've tried reading so many articles on the subjects and I just find it so damn confusing. AnugalarJS/BackboneJS. Fetching & rendering, URL parameters...etc. I know from my own experiments that JS pages struggle to rank and I've created two very similar pages, one without JS, one with JS (which had far more links) and the non-JS page ranked far higher. So, I suppose I'm asking for some help with how to begin learning this stuff. I find the articles on Moz, Search Engine Land etc to be a bit confusing...maybe I'm not technically minded enough! Cheers, Rhys
Technical SEO | | SwanseaMedicine0 -
Url folder structure
I work for a travel site and we have pages for properties in destinations and am trying to decide how best to organize the URLs basically we have our main domain, resort pages and we'll also have articles about each resort so the URL structure will actually get longer:
Technical SEO | | Vacatia_SEO
A. domain.com/main-keyword/state/city-region/resort-name
_ domain.com/family-condo-for-rent/orlando-florida/liki-tiki-village_ _ domain.com/main-keyword-in-state-city/resort-name-feature _
_ domain.com/family-condo-for-rent/orlando-florida/liki-tiki-village/kid-friend-pool_ B. Another way to structure would be to remove the location and keyword folders and combine. Note that some of the resort names are long and spaces are being replaced dynamically with dashes.
ex. domain.com/main-keyword-in-state-city/resort-name
_ domain.com/family-condo-for-rent-in-orlando-florida/liki-tiki-village_ _ domain.com/main-keyword-in-state-city/resort-name-feature_
_ domain.com/family-condo-for-rent-in-orlando-florida/liki-tiki-village-kid-friend-pool_ Question: is that too many folders or should i combine or break up? What would you do with this? Trying to avoid too many dashes.0 -
Which URL structure is better?
Quick question - Have a real estate site focused on "apartments", but apartments in not part of my company name. That being said, should which of the following URL structures should I use? http://website.com/city/neighborhood/property-name OR http://website.com/city-apartments/neighborhood/property-name
Technical SEO | | ChaseH0 -
Magento URL change
We have a Magento website parked at HostGator. The site is comprised of both a PC and a mobile version. We changed the URL to a new one ... We made the domain changes in the ‘core_config_data’ (phpMyAdmin) ... We flushed the cache in the ‘File Manager’ part of cPanel (regular and mobile version) Currently we can access the http://newsite.com (on a desktop) with no problem ... We can also access http://m.newsite.com BUT… only from a desktop PC. When we try http://newsite.com from a MOBILE device, it routes to: http://m.OLDsite.com (it keeps going to the old URL) Need some help please. Thanks in advance!
Technical SEO | | Prime850 -
What will be the future of seo ?
this question may sound like old one but i want to know something in depth. i mean will seo live forever ? Will i loose my seo job ? so just wanted to know what will be the future of seo ?
Technical SEO | | isolve1 -
Canonical URL
I previously set the canonical Url in google web masters to the non www version, when I check my on page opt, it tells me that I have a critical issue with this. Should I change it in google web masters back to the www version? if so is there the possibility of negative results? Or is there a better way to deal with this? Note, I have inbound links pointing to both types.
Technical SEO | | bronxpad0 -
Structuring URL's for better SEO
Hello, We were rolling our fresh urls for our new service website. Currently we have our structure as www.practo.com/health/dental/clinic/bangalore We like to have it as www.practo.com/health/dental-clinic-bangalore Can someone advice us better which one of the above structure would work out better and why? Should this be a focus of attention while going ahead since this is like a search engine platform for patients looking out for actual doctors. Thanks, Aditya
Technical SEO | | shanky10 -
URL rewrite question
I have adjusted a setting in my CMS and the URL's have changed from http://www.ensorbuilding.com/section.php/43/1/firestone-epdm-rubbercover-flat-roofing to http://www.ensorbuilding.com/section/43/1/firestone-epdm-rubbercover-flat-roofing This has changed all the URL's on the website not just this example. As you can see , the .php extension has now been removed but people can still access the .php version of the page. What I want is a site-wide 301 redirect but can not figure out how to implement it? Any help is appreciated 🙂 Thanks
Technical SEO | | danielmckay70