.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
-
Disabling auto-loading of Disqus Comments
We use Disqus for our comments. However, one of the issues we notice from time to time is that it takes some time to load. So we were thinking of using the Disqus Conditional Load plugin (https://wordpress.org/plugins/disqus-conditional-load/) so that only readers who are interested in comments can click on a "View Comments" button to load the comments. However, I wanted to know if disabling the auto loading of comments is a good idea from an SEO point of view. On one hand, it should reduce the page load times which should help, but just want to know if there are any issues I should be aware of before using the plugin.
On-Page Optimization | | Gautam0 -
Timeline on Moz's About Page
There has been a lot of talk about improving “About” pages on websites as of late. Moz actually has a really interesting About page, which includes a timeline. Are there any recommended WordPress plugins that can achieve a similar timeline effect?
On-Page Optimization | | VicMarcusNWI0 -
Telling Google SERP's my correct currency.
Hi, I'm having a problem with Google SERP results showing my currency as USD, when it should be CAD. An example of a page with this problem is - http://www.absoluteautomation.ca/fgd400-sensaphone400-p/fgd400.htm - can anyone see where Google is getting USD from on there? I don't see it anywhere in the coding. Thanks in advance!
On-Page Optimization | | absoauto0 -
When You Add a Robots.txt file to a website to block certain URLs, do they disappear from Google's index?
I have seen several websites recently that have have far too many webpages indexed by Google, because for each blog post they publish, Google might index the following: www.mywebsite.com/blog/title-of-post www.mywebsite.com/blog/tag/tag1 www.mywebsite.com/blog/tag/tag2 www.mywebsite.com/blog/category/categoryA etc My question is: if you add a robots.txt file that tells Google NOT to index pages in the "tag" and "category" folder, does that mean that the previously indexed pages will eventually disappear from Google's index? Or does it just mean that newly created pages won't get added to the index? Or does it mean nothing at all? thanks for any insight!
On-Page Optimization | | williammarlow0 -
Website accessible on http and https. Is it bad?
We noticed that our website is accessible on: http://www.example.com and https://www.example.com Both the versions have page rank of 4. Though on https version we have added canonical tag indicating http:// version as preferred. Is this fine or we need to use 301 redirect and let the site be accessible only on http:// version??
On-Page Optimization | | CyrilWilson1 -
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 -
Schema.org for news websites?
So as of late I have been on something of a mission to mark up my news website with as much accurate and detailed Schema and Open Graph data as possible, in order to not only allow the search engines to understand my content properly, but also to ensure everything appears in the most ideal fashion when linked to from Facebook, Google+, etc. Here is an example of a typical article page: http://www.nerdscoop.net/technology/video-games-459 As you'll see I currently have news posts marked up as article because that is essentially exactly what they are, but is there a better way to emphasise that they are news rather than just generic articles? My second question is regarding the category pages and the home page. How would be best to mark these up? With OG the task is fairly simple, because I can specify the homepage as being a website, but not so with Schema from what I can see. Either way, this is an interesting subject to me and I look forward to any discussion as a result. Thanks for looking.
On-Page Optimization | | HalogenDigital0 -
SEO for standard website pages
How do you folks approach adding some SEO value to the standard "every site has them" pages like "About Us", "Contact Us" and such? I struggle trying to find some relevant non-branded content. We normally cover all the customers relevant services and product offerings in pages specfiically tailored to that content, but don't want to waste pages if they could have some value in drawing traffic. Any great ideas, Mozworld? Thanks, Mark
On-Page Optimization | | DenverKelly0