.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
-
Best way to upload products to Magento?
The import/export tool Magento has is really disappointing, especially when it comes to uploading images. Creating products manually is very time consuming. Could anyone recommend a method to upload products through a feed, is there any plugins etc?
On-Page Optimization | | Jseddon920 -
Table text : Does that influences the website's ranking ?
We are currently working on a new page for one of our clients and there is A LOT of writing, so A LOT of differents pages. If I decide to put the texts on table text instead of creating a link for another page, will that influence the ranking in any way ? I've been a web writer for only a year now and still try to figure out how to optimize the written part. Thank you for your answers.
On-Page Optimization | | marketingmedia.ca0 -
Can soft 404's hurt my rankings?
This post mainly pertains to soft 404's but I recently dropped a few ranks in my main keyword which I have maintained prior to this my better rank for well over 2 years. I participate in NO BLACKHAT and obtain links naturally. I want to describe a few issues that happened prior to my ranking dropping and see what you guys think. I started to receive about a week prior to my ranks dropping DNS issues with GWT. It was weird because when I would use Goole Fetch on those pages they would return just fine so I was not sure what was happening there. I use Google page speed server which did in fact decrease my load time (YEAH!!) so that was cool. About 1 week prior to my rankings dropping I enabled godaddy's Website Accelerator as well thinking that could help even more. Because of this I thought maybe this had something to do with my DNS issues with Google so I decided to turn off my website accelerator with Godaddy and just leave my Google pagespeed service on. I figure I don't need 2 of them anyways IMO. Also at the same time I started to receive a ton (31,000+) html errors with duplicate metadescriptions and titles. I discovered I had an error with my code which was displaying 2 different sets of descriptions and titles for each of these pages. I since then have fixed the issue and waiting for Google to index those pages. Here is were I think I might have been hurting from the drop in rankings. Some months ago (maybe 2) I decided to redirect my 404's to my homepage. Yes I know this is not good now and I have created a proper 404 page which returns the 404 code. I recently started getting a ton of Soft 404 errors in GWT which is what brought my attention to this issue. My question is, could my action of redirecting my users to my homepage as a 404 which obviously was returning a 200 on a page that did not exist be possibly the culprit to my ranks dropping?
On-Page Optimization | | cbielich1 -
Duplicate Content from on Competitor's site?
I've recently discovered large blocks of content on a competitors site that has been copy and pasted from a client's site. From what I know, this will only hurt the competitor and not my client since my guy was the original. Is this true? Is there any risk to my client? Should we take action? Dino
On-Page Optimization | | Dino640 -
Can't find Text-Only Cached version in Google search
Hi, I'm trying to view the text-only of a webpage to run a SEO audit, however Google does not give me this option. When i click the two arrows that appear to the right of a search result, the only option I get is Cached. Is there a reason this might be happening? I've tried clearing my cookies, signing out of Google, and anything else I could find on my troll of the internet. I also tried text, only please! however whether this works or not is debatable considering it shows me actual pictures on the site. Any ideas, or maybe another add-on that will work?
On-Page Optimization | | JuiceBoxOM0 -
Image URL's have knocked my sub-pages down (WP)
I had most of my keywords within the top 10 for this site, some were even ranking in the top 5. For a possible minor boost, more-so to cover all the bases, I decided to add images to all of the pages, and they were uploaded as a gallery with most of the image file names being the same as the keyword. Thus, url's were created with our targeted phrases, extending off of the corresponding sub-page. After that, Google quickly picked up the url's to the images and began indexing them, when that occurred the sub-page which was to be the landing page, quickly tanked. Nothing else on-site changed besides the uploading of the images, so I'm sure they're conflicting and for whatever reason Google can't decide which page to index. The page that contains the images used, or the actual intended landing page. With WP I didn't see a way to not have them link to anything at all, and just be static when using a gallery, stock at least. So, my question is how can I quickly alleviate this problem and what should I do in the future to avoid this? I believe if I change link thumbnails to image file instead of attachment page, that should fix the issue... Then, I'll have dead URL's which I suppose I should 301 to the sub-page. Alternatively, is there a better solution that will work, I was also thinking about no-indexing the attachment URL's, but that doesn't seem to be an option.
On-Page Optimization | | JayAdams320 -
What's the best way to name an image for SEO?
Hi Guys,
On-Page Optimization | | krseo
I'm thinking about images and SEO. What's the best way for naming and using images in HTML Code? For example: Image-Name: keyword-keyword2-keyword3.jpg or keywordkeyword2keyword3.jpg ?
How many Keywords should I use max for a picture? And also do you use the alt tag as description of the image and the title tag or only the alt tag? If you use the title, what do you use it for? Maybe someone can copy a HTML-Code example for me 😉 Thank you 🙂
Alex0 -
5 websites, 1 root domain name: good or bad?
Hi guys, I'm new here, so this might be a basic question to the experts here! So here is my situation: I have 1 "umbrella" website (root domain name) that contains 4 different websites, for a total of 5 different websites. They are related, but we needed to brand each website differently to fit each strategy. Q: I have 23 domain names.. this means I have 23 sub-domain names?
On-Page Optimization | | Jacky_C
Q: Is this practice good or bad for my SEO?
Q: should I analyze each domain name/SD? Here are my 5 websites
RD: furisgreen.com
SD1: furcouncil.com
SD2: furfashions.com
SD3: naffem.com
SD4: beautifullycanadian.com Thank you for your help!!0