.htaccess file uploaded, website won't load
-
I uploaded the .htaccess file with the below, and now my website won't load at all? Then I deleted the htaccess file and it still won't load? But then it would load on my phone when I took it down, not on chrome, or explorer? Then I put it back up and looked again on my phone, wouldn't load on phone. Then deleted file and it still won't load on my phone? What is going on?
RewriteEngine on
RewriteCond %{HTTP_HOST} !^http://freightetc.com$
RewriteRule ^(.)$ http://www.freightetc.com/$1 [R=301]
RewriteCond %{THE_REQUEST} ^./index.php
RewriteRule ^(.*)index.php$ http://www.freightetc.com/$1 [R=301] -
You were almost there buddy. It looks like you have regex characters that need to be escaped with . Plus, most seem to prefer rewriting index before messing with www.
Give this at try. I took a look at the site before the loop and it doesn't appear to use any CMS per se. If it were a WordPress site, you would want to place the code before the WordPress rewrites.
P.S. You don't need the last comment in the example.
-
for what? Sorry not a code specialist
-
Hi have you tried it with " RewriteBase / "
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
-
New website showing old domain titles in search
Hello Moz, We have recently built a new website http://www.hegroup.org.uk/ The new site has the domain for one of the clients old sites pointing to it - heartofmersey.org.uk. When we check the SEO index (site:hegroup.org.uk) for the new site, most of of the indexed items are using the old 'Heart of Mersey' title in the index although these do redirect to the new site. See below. Heart of Mersey <cite class="_Rm">www.hegroup.org.uk/</cite>Jessica Bell · Andrew Bennett · Nicola Calder · Matt Donnelly · Alexandra Holt · Robin Ireland · Magdalena Kolka · Alison Gradwell · Matthew Philpott · Trustees. Not sure how to resolve this issue. Any suggestions Thanks Ian
On-Page Optimization | | Substance-create0 -
Nofollow links to own website pages
To preserve link juice should I "nofollow" links to about us and contact us pages that appear at the top of our navigation? I read this article - but I am not familiar with the authenticity: http://www.eminentseo.com/blog/navigation-menu-optimization-best-practices/ Thanks Mike
On-Page Optimization | | henandstag0 -
Disavow Tool Submitting 2nd File
Hi About 2 Months ago I submitted a Disavow File using the Disavow Tool I have collected more links and I am ready to upload a 2nd File, However should I download the previous file in Webmaster Tools (Disavow Tool) and add these new links to that File or if I just upload and override the existing file with this file containing new links only will that be ok. What I dont want to do is do something that removes all the previous findings from the list so that google cannot see them anymore. I guess what I am trying to say is does Google just refer to the live file I am updating / overriding or once I have submitted a file weather i remove it or not will google still have a record of it and be referring to it ? Thanks Adam
On-Page Optimization | | AMG1000 -
Google search: 'define:____'
See: http://screencast.com/t/oFSzIt5rRm Thrilled that Google is pulling our content over wikipedia (in this instance). Wondering how we can assure more success like this. Mike Corso
On-Page Optimization | | Mike_c
Gartner.com1 -
How can I fix multiple 404 errors with Wildcard htaccess redirect
Hi all I hope that someone can help.... How can I fix multiple 404 errors with Wildcard htaccess redirect The url in question is: How can I fix multiple 404 errors with Wildcard htaccess redirect http://www.5starweddingdirectory.com/listing/search/Category/luxury_hotels_venues_uk_wedding_venues/exclusive_use_venues/letter/c http://www.5starweddingdirectory.com/listing/location/uk-england/bedfordshire-weddings/franklin-park http://www.5starweddingdirectory.com/deal/location/uk-england/chorley-weddings/curtis-bay etc, going to http://www.5starweddingdirectory.com/business the above is just a few examples, google webmaster is showing over 8.000 404 page not found errors. Thanks in advance.
On-Page Optimization | | Taiger0 -
How to view all 'followed internal links' on a page
I am trying to view all the followed internal links on a few pages of my website. The MOZ toolbar just gives me the total number of internal followed links. What is the best way to actually see all the internal links that are followed by the google bot from any particular page? Thanks in advance.
On-Page Optimization | | rjchugh0 -
Website went from page 10 to 31 for a keyword
Hey Everyone I hope someone could really help me here. My website: goo.gl/5fLqv, it is an ecommerce website and just in the last few days for one my keywords "Wedding Favours" it dropped to page 31 from page 10. Could someone help me please on how to resolve this? Thanks
On-Page Optimization | | VIVOWeb0 -
Advice on why page isn't being indexed in google top 1000 for keyword
Hi, http://www.cgcomposites.com.au/composite-material.html This page isn't listed for keywords 'composite material' It has been live for a few weeks and gets grade A report for onpage optimisation? regards Michael
On-Page Optimization | | bluelilyseo0