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>
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
-
What would cause a major drop in ranking for (images) on both desk top and mobile? Web rankings are holding OK?
Sometime between Nov 8th and Nov 11th are rankings on Google for images dropped substantially. Our web rankings are holding OK. any idea!
Technical SEO | | OCFurniture0 -
Issues with getting a web page indexed
Hello friends, I am finding it difficult to get the following page indexed on search: http://www.niyati.sg/mobile-app-cost.htm It was uploaded over two weeks back. For indexing and trouble shooting, we have already done the following activities: The page is hyperlinked from the site's inner pages and few external websites and Google+ Submitted to Google (through the Submit URL option) Used the 'Fetch and Render' and 'Submit to index' options on Search Console (WMT) Added the URL on both HTML and XML Sitemaps Checked for any crawl errors or Google penalty (page and site level) on Search Console Checked Meta tags, Robots.txt and .htaccess files for any blocking Any idea what may have gone wrong? Thanks in advance!
Technical SEO | | RameshNair
Ramesh Nair0 -
$360 charged to embed 2 youtube video clips on web page with CMS system - Realistic?
Hi All, I have just had a bill from our webmaster / SEO provider for 3 hours work to embed two youtube video clips on to one page of our site (http://www.compoundsecurity.co.uk/raidervision-visual-verification-module-use-rdas-and-vx-gprs-wireless-security-systems) Now i am not an HTML programmer, but i have the ability to insert HTML code in to our eBay pages to embed videos where i want them on a page and it takes less than a minute. Would love to get feedback from several people on how long this should have taken. Is it really anywhere near 3 hours work. Everything else on the page was already there. If it means anything, the site is done in Apach Cheers
Technical SEO | | DaddySmurf0 -
Changing Web Hosting
We're about to change web hosting providers and I'm wondering whether there's an "optimal" way to do this without losing any SEO value. Is it as simple as changing hosts without SEO in mind - point the domain to the new host?
Technical SEO | | b40040400 -
URL rewriting causing problems
Hi I am having problems with my URL rewriting to create seo friendly / user friendly URL's. I hope you follow me as I try to explain what is happening... Since the creation of my rewrite rule I am getting lots of errors in my SEOMOZ report and Google WMT reports due to duplicate content, titles, description etc For example for a product detail, it takes the page and instead of a URL parameter it creates a user friendly url of mydomain.com/games-playstation-vita-psp/B0054QAS However in the google index there is also the following friendly URL which is the same page - which I would like to remove domain.com/games-playstation-vita/B0054QAS The key to the rewrite on the above URLs is the /B0054QAS appended at the end - this tells the script which product to load, the details preceeding this could be in effect rubbish i.e. domain.com/a-load-of-rubbish/B0054QAS and it would still bring back the same page as above. What is the best way of resolving the duplicate URLs that are currently in the google index which is causing problems The same issue is causing a quite serious a 5XX error on one of the generated URLs http://www.mydomain.com/retailersname/1 - , if I click on the link the link does work - it takes you to the retailers site, but again it is the number appended at the end that is the key - the retailersname is just there for user friendly search reasons How can I block this or remove it from the results? Hope you are still with me and can shed some light on these issues please. Many Thanks
Technical SEO | | ocelot0 -
Rel="canonical" and rewrite
Hi, I'm going to describe a scenario on one of my sites, I was wondering if someone could tell me what is the correct use of rel="canonical" here. Suppose I have a rewrite rule that has a rule like this: RewriteRule ^Online-Games /main/index.php So, in the index file, do I set the rel="canonical" to Online-Games or /main/index.php? Thanks.
Technical SEO | | webtarget0 -
How to rewrite WordPress permalinks for reverse proxy?
Our main site, www.domain.com, is on an IIS 6 server. When we started our blog, we wanted to put it in a subdirectory (domain.com/blog), but we couldn't because our IT people refused to support it. Instead, we built it on a third-party Apache server and configured it to open under blog.domain.com. However, I came across this SEOmoz post about the glories of reverse proxies, so I've persuaded our IT people to take a swing at it. We got it to work on a staging server, but the permalinks won't change (still appear as blog.domain.com/slug). The IT guys say it's due to a configuration problem with WordPress. Can somebody out there point me in the right direction as far as working out the URL issues with this?
Technical SEO | | ufmedia0 -
REL = cannonical and web app
I started a web app campaign for a site that I recently finished. It had no errors or warnings, but issued rel=cannonical notices for every page on the site. What does this mean?
Technical SEO | | waynekolenchuk0