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
-
URL Parameters
On our webshop we've added some URL-parameters. We've set URL's like min_price, filter_cat, filter_color etc. on "don't Crawl" in our Google Search console. We see that some parameters have 100.000+ URL's and some have 10.000+ Is it better to add these parameters in the robots.txt file? And if that's better, how can we write it down so the URL's will not be crawled. Our robotos.txt files shows now: # Added by SEO Ultimate's Link Mask Generator module User-agent: * Disallow: /go/ # End Link Mask Generator output User-agent: * Disallow: /wp-admin/
Technical SEO | | Happy-SEO1 -
Why xml generator is not detecting all my urls?
Hi Mozzers, After adding 3 new pages to example.com, when generating the xml sitemap, Iwasn't able to locate those 3 new url. This is the first time it is happening. I have checked the meta tags of these pages and they are fine. No meta robots setup! Any thoughts or idea why this is happening? how to fix this? Thanks!
Technical SEO | | Ideas-Money-Art0 -
Anyone using Adobe Business Catalyst and Fixing SEO URL Blog Updates?
Does anyone else have experience with the current update Adobe Business Catalyst has announced for their blog features? Florin at BC offered the code below: http://www.graeagle.com/images/fb_blog_og_img.jpg" /> However nether myself nor another commentator can figure out how to make it work: I added the meta data to my template but it seems the tags are not correct. For example, the tag {tag_blogpostmetatitle} does not automatically include the SEO title that I've called out in my individual blog post. So, it appears the browser is ignoring the tag and just including it as is. When I view the source for my live blog article, this is what I get for the lines that I've added the code in the tag: Also, I cannot get schema metadata to work on the BC blog. For example, I have used it on this page: http://www.homedestination.com/_blog/Real_Estate_Blog/post/things_to_know_before_building_a_new_home/; which yields the following in Google's Rich Snippet Tool: Extracted structured data rdfa-node property: title: {tag_blogpostmetatitle} description:__{tag_blogpostmetadescription}
Technical SEO | | jessential0 -
SEO for a franchise business
Were about to embark on an SEO project for a franchise business with about 150 franchises. Would it be best to give all of the franchises individual domain names or house them under the one domain? If they were on the same domain would it be worth setting them up with sub domains or with a URL so city.mydomain.com vs mydomain.com/city Thanks
Technical SEO | | acs1110 -
Same page from different locations has slight different URL, is it a negative SEO practice?
Hi, Recently we made change in our website link generation logic, and now I can reach the same page from different pages with slightly different URLs like this: http://www.showme.com/sh/?h=wlZJNya&by=Featured_ShowMe and http://www.showme.com/sh/?h=wlZJNya&by=Topic Just wondering is this a bad practice and should we avoid it? Thank you, Karen
Technical SEO | | showme0 -
Good Seo Titles
Hi. Mybsite is www.theprinterdepo.com and I am trying to find a good template for my product/page titles. Many users search our products by the product model: something like Q2121X. Some other users search by: hp 1320 printer or just 1320 printer. They will almost never search for hp 1320 new, or hp 1320 refurbished. My website is developed in magento, and we have a SEO plugin in which I can put a template for the URL and also a template for the product title. I was thinking for title and URL. title + condition + productmodel However many users search for: "refurbished printers" and maybe its better that our products say something like this: HP 1320 Refurbished Printer, instead of: HP 1320 Printer - Refurbished - Q2121X Please let me know your suggestions.
Technical SEO | | levalencia10 -
Changing DNS -- SEO implications?
Hey Moz, We're migrating an old site on an old server over to a new server/DNS. The plan is to keep the same URL structure and reuse our existing URL's. As long as we make minimal changes to each page's content, we should be able to update our DNS entry and get all the pages recreated and assigned to their correct URLs without any reduction in SEO rankings. Is this correct? This site gets a lot of organic traffic and ranks highly on some challenging keywords, so it's key that we retain our rankings as much as possible. I've read that it's wise to lower the DNS time-to-live to one hour, about a day before the move, to help Google crawl the DNS a little quicker. Are there any other recommendations you guys can offer or past experiences?
Technical SEO | | stephen_reply0 -
Global SEO Targeting
Hi, I have a website currently on the domain example.co.uk (.com is not available) I'm looking to enter other markets such as Brazil, Russia - obviously content will need to change to suit the desired market / language. I'm looking for some information on the best practice to enter foreign markets. I was thinking maybe to create individual sites for each location eg: example.br example.ru This way I could localise each site in terms of business directories, content, language etc. Or have my example.co.uk with various languages on it Experience, suggestions are welcomed - thanks.
Technical SEO | | Socialdude0