Lowercase Rewrite in web.config. Strange behavior.
-
So I am trying to implement a lower case rule in my rewrite section and I am using the same snippet below that can be found all over the web.
The lower casing of my url works fine but it adds my domain name into the URL for reasons I can't explain. so this www.SomeSite.com/Upper.aspx become www.somesite.com/somesite/upper.aspx
I removed all other rewrite rules but this one and still it happens. Has anyone seen this?
My server is IIS 7
<match url="[A-Z]" ignorecase="false"></match>
<action type="Redirect" url="{ToLower:{URL}}"></action>
-
Hi Greg, great to hear that it's working ok and was a cache issue. Thanks for the update!
-
Hi James,
I am not sure why but it seems that my problem was cache related... I went to work and saw that my urls were rewriting just fine. Sorry I didn't get back to this thread for so long.
Regards,
Greg
-
Hi Greg,
You may need to be more specific in your query, e.g.
<match url=".[A-Z]." ignoreCase="false" />
Instead of:
<match url="[A-Z]" ignorecase="false"></match>
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
-
Sudden Drop in Mobile Core Web Vitals
Web Vitals Screengrab.PNG For some reason, after all URLs being previously classified as Good, our Mobile Web Vitals report suddenly shifted to the above, and it doesn't correspond with any site changes on our end. Has anyone else experience something similar or have any idea what might have caused such a shift? Curiously I'm not seeing a drop in session duration, conversion rate etc. for mobile traffic despite the seemingly sudden change.
Technical SEO | | rwat0 -
Strange URL's for client's site
We just picked up a new client and I've been doing some digging around on their site. They have quite the wide variety of URL's that make for a rather confusing experience. One of the milder examples is their "About" page. Normally I would expect something along the lines of: www.website.com/about I see: www.website.com/default.asp?Page=About I'm typically a graphic designer and know basically nothing about code, but I just assume this has something funky to do with how their website was constructed. I'm assuming this isn't particularly SEO friendly, but it doesn't seem too bad. Until I got to another section of their site. It's a section that logically should look like: www.website.com/training/public-seminars It's: www.website.com/default.asp?Page=MT&Area=Seminars&Sub=MRM Now that's nonsensical to me! Normally if a client has terrible URL's, I'd say let's do some redirects, but I guess I'm a little intimidated by these. Do the URL's have to be structured like this for some reason? Am I missing some important area of coding here? However, the most bizarre example is a link back to their website from yellowpages.com. Where normally I would expect it to lead to their homepage, I get this bizarre-looking thing: http://website1-px.rtrk.com/?utm_source=ReachLocal&utm_medium=PPC&utm_campaign=AssetManagement&reference_id=15&publisher=yellowpages&placement=ypwebsitemip&action_target=listing_website And as you browse through the site, that strange domain stays. For example the About page is now: http://website1-px.rtrk.com/default.asp?Page=About I would try to google this but I have no idea where to even start! What is going on with these links? Will we be able to fix them to something presentable without breaking their website?
Technical SEO | | everestagency0 -
Establishing our web pages as the original source
I'm currently working on a recrutiment website. One of the things we do to drive traffic to the site is post our job listings out to a number of job boards eg. Indeed. These sites replicate our own job listings which means that for every job there are at least 5-10 exact duplicates on the web. By nature the job boards have good domain authority so they always rank above us but I would still expect to see more in the way of long-tail traffic. Is it necessary for me to claim our own job listings as the original source and if so, how do I go about doing it? Thanks
Technical SEO | | shr1090 -
Responsive web design has a crawl error of redirecting to HTTP instead of HTTPS ? is this because of the new update of google that appreciates the HTTPs more?
We at yamsafer.me are using a Repsonsive web design! A crawl errors occured which redirects the hompage to an HTTP version instead of HTTPS? Any ideas on why this happened?
Technical SEO | | Yamsafer.com0 -
Recommended Web Hosting Companies
Some of you might have seen that I recently discovered that another was mirroring my website(petmedicalcenter.com). Found out that this domain (justinchina.co.uk) was previously hosted on Host Monster and when we upgraded to a dedicated IP this last year we got that same IP address. Unfortunately, the justinchina.co.uk domain from GoDaddy is still pointing to our server/IP. Thus the mirrored site. This has been a huge headache and a loss in rankings has made this even more frustrating. Instead of giving me a new IP address, Host Monster said to just add this to my htaccesss file: RewriteEngine on
Technical SEO | | BCB1121
RewriteCond %{HTTP_REFERER} justinchina.co.uk
RewriteRule .* - [F] I waited 24 hours, submitted two support tickets, and talked to 4 tech support people and this is the solution I receive when they should have given me a new IP. I think it is time to switch. Any good host recommendations?0 -
Duplicate Page Titles Warnings, htaccess Rewrite & Canonical Links.
Hey guys, Just signed up for a pro account and I am getting Duplicate Page Title warnings on links that are duplicate, rewritten for SEO, but have a canonical href tag. I have two sets of links in my store: SEO friendly: http://www.mysite.com/item/iphone-case Operational link: http://www.mysite.com/shop/product.php?pid=11 This operational link however has a href canonical tag pointing to the SEO friendly link as being the primary link. My question is; Do I need to worry about this Duplicate Page Title Warning if I am using a canonical tag on the Operational link pointing to the SEO friendly link? Thanks!
Technical SEO | | jason3600 -
Is there a great tool for URL mapping old to new web site?
We are implementing new design and removing some pages and adding new content. Task is to correctly map and redirect old pages that no longer exist.
Technical SEO | | KnutDSvendsen0 -
Google Web Master Tools - Keyword Variants & misspelling
We have millions of urls and the technical expertise to write code to fix the spelling of keyword variants Google has discovered and shows us in Web Master tools. Since Google has recognized these as variants, is it worth our time to write code that will fix the spelling of obvious misses?
Technical SEO | | snoopcat0