How do you create a 301 redirect for www.mysite..com/index.html in htaccess.
-
I understand that it is possible to create a 301 redirect for www.mysite..com/index.html to www.mysite.com. (as well as subdirectories.) How is this accomplished? My hosting company says that setting this up in htaccess will cause "Apache to geti into an infinite loop and the page won’t load." I have read on the forum that this is possible. Any help would be greatly appreaciated.
THanks. Perri
-
-
Unfortunately we have off-site links that point to directory/index.html
-
Firstly make sure you have no on-site references to index.html else you'll be distilling your link juice. Ensure all references to you home page are www.mysite.com/
For the redirect try the following:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://www.mysite.com/ [R=301,L]
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
-
Ad server not indexed
Hello guys, My client is using an ad server (not sure if i am allowed to tell which one so I will not for now) installed at ads.clientsite.com. It is using noindex, nofollow for preventing Google to index it but also it is blocking like 90 000 other pages on clientsite.com to be indexed/crawled. The guy that applied the noindex tag it is no longer here so I cannot ask him about the logic behind those noindex tags. How big could be the damage to clientsite.com if I will remove the noindex tag from the ad server (ads.clientsite.com? If needed I can PM you the ad server platform we are using, Regards, Ed
On-Page Optimization | | Noriel1 -
Creating Content for over 50,000 Pages
Hi, Our site is a football (soccer) statistics sites. We gather information on upcoming games and post results of past games. At the moment we have over 50,000 pages of results each having in-game data displayed. The main problem I have is none of these match data pages has any text.Mostly tables of stats. Could anyone suggest a way of creating unique content for these pages? If I created some generic a paragraphic of text that changed based on stats and figures would this be seen as duplicate content?
On-Page Optimization | | jtatsubana0 -
301 directs
How do i determine which of my pages have been indexed by Google? and if they haven't been indexed how is this achieved? Also how do I set up a 301 redirect?
On-Page Optimization | | Hardley1110 -
What is the right schema.org link for a web design / developer / mobile agency?
It seems strange that a group of web developers would make up an entire structured language to designate businesses by category and somehow forget to include companies like.... web developers. So I must be missing it, what is correct to use?
On-Page Optimization | | yeagerd0 -
Trying to maintain rank while switching back & forth from sitewide 301 to 302 redirects?
My company's website has earned industry "authority" over the years and ranks well for a number of keywords. For reasons not worth explaining, we've moved the entire site (all pages) to be secured (https from http). When we launch our completely new website in 5 months from now, we will launch it as "http:" For the next 5 months, we're stuck with using site-wide "https". Is it better to 301 or 302 all pages (from http -> https), with the intent to move back to 301 in 5 months from now? Obviously, this situation is not ideal, but we'd like to preserve as much authority/presence as possible. What should we do and why? Any input would be greatly appreciated!
On-Page Optimization | | WhiteCap0 -
SEF URLs. Should I use / or - ?
I have o activate SEF URLs in a website. Regarding SEO, is there any difference between using / or - ? I mean, Is it better to write URLs like this: http://www.domain.com/folder/folder/page or like this: http://www.domain.com/folder-folder-page ? Is there any difference? Thanks!
On-Page Optimization | | ociosu0 -
How do I do a 301 Redirect in IIS 7 from http://www.freightmonster.com/index.html to http://freightmonster.com/index.html when I don't have a physical page to redirect?
I'm trying to get rid of my Rel Canonical links and use the 301 Redirect instead.
On-Page Optimization | | FreightBoy0 -
Should I fix 302 redirects?
I have a Magento ecommerce site that allows customers to compare products. When SEOmoz crawled the site, it came back with over 6,000 302 redirect errors related to the compare products feature. Is this harming our rankings? And any suggestions on the best way to fix it?
On-Page Optimization | | AmazingPlans0