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
-
New SEO manager needs help! Currently only about 15% of our live sitemap (~4 million url e-commerce site) is actually indexed in Google. What are best practices sitemaps for big sites with a lot of changing content?
In Google Search console 4,218,017 URLs submitted 402,035 URLs indexed what is the best way to troubleshoot? What is best guidance for sitemap indexation of large sites with a lot of changing content? view?usp=sharing
Technical SEO | | Hamish_TM1 -
URL path randomly changing
Hi eveyone, got a quick question about URL structures: I'm currently working in ecommerce with a site that has hundreds of products that can be accessed through different URL paths: 1)www.domain.com/productx 2)www.domain.com/category/productx 3)www.domain.com/category/subcategory/productx 4)www.domain.com/bestsellers/productx 5)... In order to get rid of dublicate content issues, the canoncial tag has been installed on all the pages required. The problem I'm witnessing now is the following: If a visitor comes to the site and navigates to the product through example 2) at time the URL shown in the URL browser box is example 4), sometimes example 1) or whatever. So it is constantly changing. Does anyone know, why this happens and if it has any impact on GA tracking or even on SEO peformance. Any reply is much appreciated Thanks you
Technical SEO | | ennovators0 -
How to fix these unwanted URLs?
Right now i have wordpress, one page website, but google also show wp-content. KIndly check below in google. site:http://baltimoreelite.com/ How I can fix this issue?
Technical SEO | | marknorman0 -
Seo Yoast Plugin
In Yoast seo plugin, under the general settings is Sitewide meta settings,under which there is an option to either check or leave unchecked Noindex subpages of archives which says: If you want to prevent /page/2/ and further of any archive to show up in the search results, enable this. I am very confuse if to check or not. What is the best seo practice? Most of our posts are in categories which have 2-4 pages.
Technical SEO | | VillasDiani0 -
Writing of url query strings to be seo frinedly
I understand the basic concepts of url write and creating inbound and outbound rules. I understand the creating of rules to rewrite url query strings so that it’s readable and seo friendly. It’s simple when dealing with a small number of pages and database records. (Microsoft Server, asp.net 4.0, IIS 7) However, I need to understand the concept to handle this: Viz the following: We have a database of 10,000+ establishments, 650+ cities, 400+ suburbs. Each establishment can be searched for by country, province, city and suburb. The search results show establishments that match the search criteria. Each establishment has its own unique id. Each establishment in the search results table has a link to the establishments detailed profile aspx page. The link is a query string such as http://www.ubuntustay.com/detailed.aspx?id=4 which opens the establishments profile. We need to rewrite the url to be something like: http://www.ubuntustay.com/detailed.aspx/capetown/westerncape/capetown/campsbay/diamondhouse which should still open the same establishment profile as the above query string. I can manually create a rule for this one example above without a problem. But there are over 10,000 establishments, all in different provinces, cities and suburbs. Surely we don’t manually generate a rewrite rule for each establishment? The resulting .htaccess will be rather large(?!) Therefore my questions are: How do I create url rewrite rules for dynamic query strings that originate from a large dataset? How do I translate the id number into the equivalent <country>/<province>/<city>/<suburb>/ <establishment>syntax?</establishment></suburb></city></province></country> Do I have to wire-up the global.asax so that every incoming requests extracts the country, province, city and suburb based on the establishment id which seem a bit cumbersome(?). If you’re wondering how I currently do it (it works but it’s not very portable or efficient): For each establishment which is included on the search results I simply construct the link url as: http://www.ubuntustay.com/detailed.aspx/4/Diamond%20House/Camps%20Bay/Cape%20Town On the detailed.aspx page load I simply extract the record id (4 in the example above) from the querystring and select that record from the db. Claude, what I’m looking for is advice on the best approach on how to create these rewrite rules and would be grateful if you can have one of your SEO friends lend their advice and experience. Any web resources that show the above techniques would be great. I’m not really looking for simple web links to url rewriting overviews…I have plenty of those. It’s the detail on the specific requirement above that I need please.
Technical SEO | | claudeSteyn0 -
SEO Benefit/Liability of changing URLs of a 2 year old site
I sell RV Parts online. Our organization is called The ROUTE 66 RV Network, so we brand everything around ROUTE 66. When we launched our store 2 years ago, we launched it with the domain: parts66.com We have a PR of 2, and we have been doing an SEO linkbuilding campaign ever since it has been around. Our primary keyword that we are trying to rank for is RV PARTS We also own the domain: rvparts66.com My question is: Is there a significant benefit to switching our URL to RVPARTS66.COM? Does having our primary keyword a part of our URL give us an SEO benefit? If so, what is the best way to keep any credit we have built for our original domain? We are in the process of a complete site overhaul which will launch in a couple weeks, so if there is ever a time to switch domains, the time is now. Thanks! jc
Technical SEO | | steve-2886180 -
Difference between URL Rewrites and 301 Redirects for Rankings
What is the difference between URL rewriting and 301 redirects? Specifically if my home page is rewriting the www. version and the /index.html version rather than 301 redirecting them is this equivalent? Does it still pass the link juice on those alternate variations the same way a 301 redirect will?
Technical SEO | | rcarll0 -
Help with SEO
Hello, I am brand new to SEO and I'm learning on the go everyday. I am having issues with Google and getting any sort of ranking or analysis or even just traffic reports. I understand the site has never really been optimized so it might really not have any reports. So basically my real question is what helpful tricks or hints do you guys have that I can implement? Anything and everything helps. So far I have run the crawl diagnostics and I'm working on fixing the errors. Thanks fr your help.
Technical SEO | | Future130