.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
-
Will Google Count Links Loaded from JavaScript Files After the Page Loads
Hi, I have a simple question. If I want to put an image with a link to another site like a banner ad on my page, but do not want it counted by Google. Can I simply load the link and banner using jQuery onload from a separate .js file? The ideal result would be for Google to index a script tag instead of a link.
On-Page Optimization | | CopBlaster.com1 -
Disadvantages of Migrating Website to New URL
Hi There, I am currently struggling with the ranking of my website. No matter how many initiatives I try (backlinking, blog commenting, social posting, etc.) I can't seem to make any progression in Google Search. I've done competitive metrics through Open Site Explorer and can't seem to really find the reason why my site is not ranking as well as my competitors. The only one possible glaring element I've thought about is my website URL. This company is in the heating and cooling industry and majority of my competitors have either "heating" or "cooling" or both in their website URL's but mine does not. Does anyone have any thoughts or recommendations on if changing my URL and then redirecting my current URL would be a step in the right direction help me to climb the rankings in Google Search? Thanks!
On-Page Optimization | | MainstreamMktg0 -
Should Title Tags Differ From H1's?
I never thought this was an issue, but now, I'm not so sure. Is it a problem for your title tags to be identical to your H1's? From Moz' OnPage Grader section on "H1's and Title Tags," I thought they were supposed to both match your keyword. Any thoughts? Thanks, Ruben
On-Page Optimization | | KempRugeLawGroup0 -
Duplicate content with mine other websites
Hi,
On-Page Optimization | | JohnHuynh
I have a primary website www.vietnamvisacorp.com and beside that I also have some secondary websites with have same contents with primary website. This lead to duplicate content errors. What the best solution for this issue? Please help! p/s: I am a webmaster of all websites duplicate content Thank you!0 -
Replacing website, same URL, lose ranking
We had to do a rush job for a client and get a website up very quickly. We had to just replace the existing files on the server, but URL stayed the same. Now "teeth whitening glasgow" which they were number #1 for isn't coming up. Know there is still some on page work to be done - but the link profile should still remain the same? Just looking for some advice to get back to where they were - should we do a website change of address or just verify the site in Webmaster and get all the on page done? Thanks, Laura
On-Page Optimization | | lauratagdigital0 -
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 -
Long or Short URLs. Who's Coming to Dinner?
This has been discussed on the forums in some regard. My situation. Example 1 Long Keyword URL: www.abctown.com/keyword-for-life-helping-keywords-everywhere-rank-better Example 2 Short Keyword URL: www.abctown.com/keyword In both examples I want to improve rankings for the "keyword" phrase. My current URL is example 1. And I've landed a page one ranking in Google (7) with that URL. In attempts to improve rankings further (top 5), I was toying with the idea of going simpler with all my URLs in favor of the example 2 model. Might this method help or hurt my current rankings? In recent articles I've read it seems that going with the simpler more human approach to my SEO efforts. Any thought would be appreciated. Cheers,
On-Page Optimization | | creativedepartment0 -
Should I remove my footer? and criticize my website
The simple question, should I delete my footer or keep it. Visit TraxNYC.com I dont wont to give my personal opinion yet, just because I dont want to influence any answers. Delete it! - Explain why? Keep it! - Explain why? Good Luck!
On-Page Optimization | | DiamondJewelryEmpire0