.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
-
Facing issue related to my website.
I am facing issue regarding to my website **https://mylovelylawn.com/. As some pages are not indexed by google yet. Can Anyone help me out how to indexed those pages to improve my ranking. **
On-Page Optimization | | qwaswd0 -
Should I remove a high traffic page on my website?
For the last few years, a particular blog post on my site has gotten 3 times as much traffic than any other page, even the home page; however, the topic of the post is only moderately related to the website topic and I'm wondering if all that unrelated traffic is negatively effecting SEO for our primary keywords. Here's an example.... Site topic: Yoga retreats in Costa Rica (we want to attract people who are interested in booking a yoga retreat) Blog Topic: How to extend your visa in Costa Rica (it's related only because it's about Costa Rica and travel, and may help our visitors stay longer) Other Notes: In 4 years, visitors to that blog post have never converted. Blog post bounce rate is 56%, significantly higher than almost any other page Lots of comments on the blog post so visitors to it are engaged and find it very useful To get an accurate reading of interested visitors to the site, i always have to filter entrance visits to this post in my analytics because these users are not an accurate representation of the visitors we're trying to draw. My question: Because I get so much traffic from the blog post, which is about the visa renewal process, will Google consider the website less about yoga and more about visas? If so, will it make it more difficult to rank well for yoga in Costa Rica? Does Google say to itself, "Hey, this website can't be an authority about both yoga and visas in Costa Rica so we're going to consider it a visa site because of all the visits and engagement it gets for that topic." So should I remove the post or just leave it alone? It offers a lot of people valuable information so I would never delete it entirely, but would redirect it somewhere else. Thanks!
On-Page Optimization | | Cabaretti0 -
Auto loading articles ?- best practices
Hi all! In the past months I see more and more website that doing 'auto loading articles in scrolling' - can you tell me if it's okay for SEO and what are the best practices for this? Thanks!
On-Page Optimization | | JohnPalmer1 -
Hiding body copy with a 'read more' button
Hi Whats the consequences of hiding half of the lovingly crafted body copy/written content (good quality modern version of what we used to call seo text) i have written for a clients main site sections and then having a 'read more' button to reveal ? I have written 500+ words for each page but client wants to reduce word count displayed since thinks looks too 'wordy'! I know that this is possible and used to be fine if done in a manner that was still crawlable, is this still the case ? Cheers Dan
On-Page Optimization | | Dan-Lawrence0 -
What's the best way to handle crawling of photo gallery?
When you have a photo gallery with many search filters and loads and loads of pages, is it best to block all the filters and use google's pagination code? Ex: http://photo.net/gallery/photocritique/filter This site has pages for many different queries. While the page titles are unique, the pages are showing duplicated content.
On-Page Optimization | | cakelady0 -
Google's Page Layout Algorythm
It seems that Google have been or will penalizing websites with too many ads above the fold. Is it me or Google's search result layout is a perfect example of what NOT to do?
On-Page Optimization | | sbrault741 -
What is the importance of image file names and H1, H2 and H3 tags
Hello, My client thinks they will get better rankings if we change the product image names to reflect the keywords for that page, is this true? I believe I just have to add "alt tags" but not sure now. Also, they think its very important to have H1, H2 and H3 tags on each page. I thought this wasn't a big factor anymore. Is it? Thanks
On-Page Optimization | | maximumrank0 -
How to Resolve Google Crawling Issues for My eCommerce Website?
I want to resolve Google crawling issues for my eCommerce website. My website is as follow. http://www.vistastores.com/ Google have crawled only 97 webpages from my website. My website is quite old. (~More than 6 months) But, Google have indexed only 97 webpages. I have created one campaign over SEOmoz tool and found some errors over there. So, I just assumed that due to it Google did not crawled my website. But, I have created one another campaign for my competitor website to know actual status and reason behind it. I found that, my competitor website have more error compare to me but, Google have crawled maximum pages compare to me. So, What is reason behind it? How can I improve my crawling rate and index maximum webpages to Google? [6133009604_af85d29730_b.jpg](img src=) 6133009604_af85d29730_b.jpg 6133009604_af85d29730_b.jpg 6139706697_4e252fdb82_b.jpg
On-Page Optimization | | CommercePundit0