.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
-
Internal Website Linking from Syndicated Blog Posts
Does it help, hurt, or do nothing for my website's SEO if I do internal linking from syndicated blog posts (on my blog) to my website pages? For example, a syndicated blog post on winterizing your house has instances of "homeowners insurance" linking to my webpage on homeowners insurance. Proper canonicalization is done as well.
On-Page Optimization | | BFMichael0 -
Using h2 for category on ecommerce website
Hi, I am working on an ecommerce site and the main category - lets call them car widgets - is using a h1 at the top of the page which is great. There are 4 sub categories on the page - lets call one of them red widget. The only content on the page is the sub category name and an image. Should the sub category red widget use a h2? Thanks S
On-Page Optimization | | bedynamic0 -
Optimizing an e-commerce website
Hi, What do you recommend me to optimice an e-commerce website to rank every page or product? Do I have to implement schema and meta description for every product or is easier to optimice every category?
On-Page Optimization | | AbacoDigital0 -
Strange SERP's descriptions
Hey, when I googled one of our products i came up with this strange result, see attachment. I searched for: kurs praktische psychologie on google germany. These words also come up in the meta description of this page:** Praktische Psychologie** Fernkurs mit professioneller Betreuung. Testen Sie den praxisorientierten Kurs über die Grundlagen der Psychologie 4 Wochen kostenlos. and in the body: _Sie glauben der Mensch lässt sich trotz all seiner Facetten durchschauen, wenn man sich nur Mühe gibt ihn zu verstehen? Da liegen Sie vollkommen richtig! Der Kurs "Praktische Psychologie" vermittelt Ihnen hierfür alle Kenntnisse und Fähigkeiten, sodass Sie schon bald das Mysterium Mensch ergründen. _ Why is Google still showing this description which i obviously don't want to be shown, and why does it state _spring naar (jump to) Kursgeburh _and how can i avoid this? yd1DStW
On-Page Optimization | | NHA_DistanceLearning0 -
I want to improve our client's website structure, so he gets more traffic locally. What advice do you have ?
We want to "revamp" our client's website, by improving the overall looking (content, images, structure). Our client is a small retail business but wants to have more traffic. What advice can you give me ?
On-Page Optimization | | marketingmedia.ca0 -
Why Can't I Get Indexed?
I cannot seem to get my website indexed by Google! I submitted the sitemap using Google WMT about a month ago but only one page is being indexed. There are very few backlinks to the site, so I don't believe there are any penalties due to over-optimization that would prevent indexing. Also, my robots.txt file is properly configured and is not preventing any pages from being crawled. I've tried using the "Fetch as Google" settings in WMT with no luck. Any ideas?
On-Page Optimization | | socialfirestarter0 -
Duplicate Content: Snippets from Blog on Website
Our company has a website and a blog, each on a separate domain. On our website's home page, we include snippets from some of our blog posts and links to such posts. The snippets include the same photo, title, and first line or so of text. We have been told and am concerned that search engines will categorize this as duplicate content. Any recommendation as to how we can get around this issue aside from not including the blog posts on our site? I imagine we are not the first company to want to do this. www.angelicolaw.com Thanks,
On-Page Optimization | | BrazilLaw
Greg0 -
Image file name, is it important
If I use the same image all over my site, do I need to change the file name to avoid duplicate? Different alt text will be use on those images
On-Page Optimization | | BigBlaze2050