Clean URL help!
-
Hi all,
In short, i'm looking to redirect examplepage.html to examplepage .I've got rid of the .html, sitewide this morning. However I want to redirect Google & people who have bookmarked the old url structure.
Currently if you have the extension on or not, it will show in your browser.
I'm wanting /examplepage.html to 301 redirect to /examplepage
I've gone the normal way I'd do it by adding in .htaccess:
Redirect 301 /examplepage.html http://www.example.com/examplepage
I'm assuming it isn't redirecting as the example.html page is no longer... what is the way around this?
Thanks for any help!
In firefox the error of the page is:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
-
Hi,
I've found a solution, however thought i'd share.
Within the .htaccess file, i've added
# 301 permanent redirect all .html to non .html
RewriteCond%{THE_REQUEST} \.html RewriteRule^(.*)\.html$ /$1 [R=301,L]
Thanks
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 is the best way to structure website URLs ?
Hi, can anyone help me to understand if having category folder in URL matters or not? how to google treat a URL? for example, I have the URL www.protoexpress.com/pcb/certification but not sure google will treat it a whole or in separate parts? if in separate parts, is it safe to use pcb/pcb-certification? or it will be considered as keyword stuffing? Thank you in anticipation,
Intermediate & Advanced SEO | | SierraPCB1 -
How should you determine the preferred URL structure?
Hi Guys, When migrating to a new CMS which include new pages how should you determine the URL structure, specifically: So should we include www. or without it? Should the URL have a trailing slash? How would you determine the answer to these questions? Cheers.
Intermediate & Advanced SEO | | kayl870 -
URL in russian
Hi everyone, I am doing an audit of a site that currently have a lot of 500 errors due to the russian langage. Basically, all the url's look that way for every page in russian: http://www.exemple.com/ru-kg/pешения-для/food-packaging-machines/
Intermediate & Advanced SEO | | alexrbrg
http://www.exemple.com/ru-kg/pешения-для/wood-flour-solutions/
http://www.exemple.com/ru-kg/pешения-для/cellulose-solutions/ I am wondering if this error is really caused by the server or if Google have difficulty reading the russian langage in URL's. Is it better to have the URL's only in english ?0 -
Help Me find a Great Seo for my Budget!
I am looking for a Good SEO for my tech news site and would like your help in recommending a good SEO that will fit in my budget of 300-500 per month.I have contacted many firms in the Moz directory of recommended firms but found they are out of my monthly price range.Google search for a decent SEO can be scary with so many so called SEO companies.I would like to work with a experienced SEO individual who can come up with a great plan for our site and also implement them.We just had a SEO forensic audit done with Alan Blieweiss and implemented his suggestions and are now looking for someone to work with long term for the rest of our SEO needs.I understand that I cannot afford the top SEO firms or industry leaders but with your help and suggestions I am sure we can afford and find a great SEO. Please reply here or message me.
Intermediate & Advanced SEO | | chrisyak0 -
Repeat name and location in URL or no ?
in this url www.stjeromemitsubishi.ca, is it a good thing to repeat the name and location in the url but with ''-''sign between? ex: www.stjeromemitsubishi.ca/partsandservice/stjerome-mitsubishi-contact.aspx
Intermediate & Advanced SEO | | DavidPilon0 -
How to 301 redirect all URLs with /? in?
I want to redirect all URLs that have /? in it. Indexed in Google is a bunch of urls lik: mysite.com/?674764 mysite.com/?rtf8y78 I want all these URLs to be redirected to my home page. Any ideas?
Intermediate & Advanced SEO | | JohnPeters0 -
URL stucture like Zappos?
Hi, My site structure looks like this. domainname.com/nl/holidayhouses/villa-costa
Intermediate & Advanced SEO | | remcozwaan
domainname.com/nl/apartments/apartment-caifem ect. I just went to zappos to research the site and het notice me that zappos.com has no directories. If i implement this my structure looks like this. domainname.com/nl/holidayhouse-villa-costa
domainname.com/nl/apartments-apartment-caifem Is this a better approach? Ciao, Remco0 -
SEO Overly-Dynamic URL Website with thousands of URLs
Hello, I have a new client who has a Diablo 3 database. They have created a very interesting site in which every "build" is it's own URL. Every page is a list of weapons and gear for the gamer. The reader may love this but it's nightmare for SEO. I have pushed for a blog to help generate inbound links and traffic but overall I feel the main feature of their site is a headache to optimize. They have thousands of pages index in google but none are really their own page. There is no strong content, H-Tags, or any real substance at all. With a lack of definition for each page, Google see's this as a huge ball of mess, with duplicate Page Titles and too many onpage links. The first thing I did was tell them to add a canonical link which seemed to drop the errors down 12K leaving only 2400 left...which is a nice start, but the remaining errors is still a challenge. I'm thinking about seeing if I can either find a way to make each page it's own blurb, H Tag or simple have the Nav bar and all the links in the database Noindex. That way the site is left with only a handful of URLs + the Blog and Forum Thought?
Intermediate & Advanced SEO | | MikePatch0