.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
-
When writing content for a website what is the optimal copy length?
My site is currently in the mist of a redesign and I’d like us to compile some recommendations on the length of copy for a page to rank well but can't seem to find any up to date articles on this.Does anyone have any suggestions, comments, or feedback?Thank you.
On-Page Optimization | | PorshaAndrea0 -
Regarding Google Title 'Width' and changing Meta Titles w/o Penalty?
A vast majority of pages on my site are now too wide (the character count was fine prior to the March update). I want to go through and update them so they display properly and are not too wide.However, I am concerned, as my understanding was that changing Meta Titles is dangerous and can have a negative effect on your rankings and can cause real issues. Is this an opportunity to change my Titles all-together without any kind of penalty? Or can I only trim the end part? In summary: 1. Can I edit all of my Meta Titles without affecting my rankings? 2. If no, how do I edit them properly to fit within the proper width and not cause any issues? 3. If yes, I can go through and change all my Meta Titles to whatever extent and optimize them to reflect latest best practices? There are changes I wanted to make to all my meta titles but I've been afraid to... due to fear of rankings drops etc Any help with this would be greatly appreciated
On-Page Optimization | | lawfirm0 -
My Site's Name Not Ranking in Google
Hey all, I've seen a few posts like this. But I wanted to start a new thread in hopes I may find the underlying issue. I've had my site: http://www.ctrl-alt-success.com for about 2 years. Recently I've started really adding a lot of content to it. (about 2-3 posts a week). I get zero organic views which is fine as I know it's still in the beginning. But here's my main question. If I type "ctrl-alt-success" into google. I get some site that shows up. "ctrlaltsuccess.com" I've been looking at this issue forever. That site has been "coming soon" for nearly 2 years. lol My site doesn't even show up on the first 10 pages of google. However in Bing and Yahoo it ranks on the first page. What could my site be doing wrong that it's not even ranking for the exact domain name? Keep in mind, if I google "ctrl-alt-success.com" my site comes up fine. Any help would be appreciated, thanks!
On-Page Optimization | | Ctrl-Alt-Success0 -
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 -
Using example.info when example.com is a link farm. Ok? Bad? Doesn't matter?
Second question of the day- I'm helping a friend with his law firm site. He is using example.info because example.com is being used by a link farm. Is this hurting his search efforts? Thanks
On-Page Optimization | | ahossom0 -
Slow page load times from asynchronous javascript
Our analytics are showing that our homepage takes, on average, ~14 seconds to load. All of the content on the page loads fairly quickly, while it takes a few seconds to load the social media stuff (which is mostly asynchronous javascript that is running in the background). The question is this: Does Her-Magesty-Google take into account the amount of time it takes to load everything, including the social media stuff from asynchronous javascript? Or does Google see that the content loads fairly quickly and doesn't ding me for the js that is running in the background?
On-Page Optimization | | ibfx0 -
Image Optimization - File Name Important?
I am currently working on a site with 100+ recipes that all have image file names that are relevant, but not optimized for keyword purposes. I'm wondering - from an SEO perspective - would it be worth my time to go back through all of the images and rename them with keywords in mind? On my own site I have always done this as a "best practice" but I'm curious - does it make a difference to search engines? Does anyone have any recent research/experiences that they would like to share? Thanks!
On-Page Optimization | | EssEEmily0 -
Is it possible to get good SEO results with small brochure websites?
Say I have a 5 page website with 300 words and 4 images on each page. No or little dynamic content. No blog. Is it still possible to get good SEO results in a site like this? what would be the best strategy? what challenges would I need to over come? or is it just too much of an up hill battle?
On-Page Optimization | | iSenseWebSolutions0