.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
-
How to 301 redirect, without access to .htaccess and to a new domain
There are few ways to do this and I would like to ask other Mozzers if they have found the best way. We have a site .co.uk and are moving it back to .com. However we do not have any access to the site folders for .co.uk. (We have to move it anyway as our provider is withdrawing their service). We have built our URL 301 redirect file and it is ready to go, but how to impliment it? We can repoint .co.uk to another site, and then redirect all traffic for each URL but this is quite messy, or just forget trying to 301 each page and just rediect the whole site.
On-Page Optimization | | BruceA
the .com has more authority already, but we ready do not want to frustrate visitors who are using a link to reach a product, only to find they hit our homepage and not the product. Your thoughts would be very welcome or other ideas Bruce0 -
Building an optimised friendly website
We are in the process of having a new website built and was wondering what factors do we need do we need to instruct our web company to include, at the build phase, to ensure that we can easily optimise it for SEO purposes. They have designed us a previous site that has excessive duplicate URLs and they haven’t given us access to the code so we can’t add 301 redirects etc and would like to avoid this in the future. I look forward to hearing from you
On-Page Optimization | | Hardley1110 -
What's the point of my blog?
My website, www.toplinecomms.com has a reasonably good blog that gets quite good interaction and sharing. I introduced the blog at the start of 2013 because the general sentiment from all the SEO books and articles I had read was that a good blog could be invaluable to a search marketing campaign. The posts on the blog are keyword optimised and they get great shares and social engagement. However, I have noticed that the blog is stealing my services' pages' thunder! There are some keywords that I am keen for our services pages to rank for, but the blog is beating them to it! So my question is: How should I be using my blog to get my services pages to rank higher?
On-Page Optimization | | HeatherBakerTopLine0 -
Meta Geotag - two locations on one website
I have a client that I would like to do a Meta Geotag for. They have two locations. Am I able to do two meta geotags on their website? Thanks!
On-Page Optimization | | OOMDODigital0 -
Does a page's url have any weight in Google rankings?
I'm sure this question must have been asked before but I can't find it. I'm assuming that the title tag is far more important than the page's url. Is that correct? Does the url have any relevance to Google?
On-Page Optimization | | rdreich490 -
SEO for spanish website
Hi, A client has given us the site http://www.comtranslations.com/Home.html for optimization. He wants to optimize only the spanish part ( the link is on the top right ). By clicking on the link Espanol, the url opened is - http://www.comtranslations.com/Principal.html. He wants seo for this website for spanish keywords. The keywords are - Traducción
On-Page Optimization | | seoug_2005
Traductor
traducir español inglés
traducción My question is how do we go about this ? Shall we purchase a software that translates spanish to english ? Thanks0 -
My blog title is getting added to my post title and I can't figure out how to remove it
Hello everyone, I am sure most of you guys know how to do this. I am finding that when my posts are listed in google, my blog title is added to my post title. 2 questions. 1. Is this hurting my rankings because the blog title is diluting my keywords making it look like I have a huge title? (the on page optimizer is dinging me for this. 2. I use a self hosted wordpress blog with the all in one seo plugin. Does anyone know how to remove the blog title from being appended to the post title? I thought I could do that in all in one seo by checking the rewrite title box and just having it say %post_title% but that didn't fix it. Also it was doing it before I checked that box as well. Any other ideas to try? Thanks
On-Page Optimization | | FastLearner0 -
I need quality backlinks. Do they need to be similar to company website?
Our website seems to be well optimized. However I need to find more quality backlinks. I am having a hard time with this. Do backlinks have to related to the company? The reason I ask is because I can receive some links, but they do not relate to our company. BUT sometimes we have customers come to our facility and we book them a local hotel room and send them to near by restaurants. Is it ok to have local restaurants and local hotels links on our website and have them link to ours, on a page for customer visits. OR any other tips on receiving quality backlinks?
On-Page Optimization | | hfranz0