.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 I have duplicate content on my own website?
Hello Moz community, We are an agency providing services to various industries, and among them the hair salon industry. On our website, we have our different service pages in the main menu, as usual. These service pages are general information and apply to any industry.We also have a page on the website that is only intended for the hair salon industry. On this page, we would like to link new service pages: they will be the same services as our “general” services, but specialized for hair salons. My questions relate to duplicate content: Do we have to make the new individual service pages for hair salons with completely different text, even though it’s the same service, in order to avoid having duplicate content? Can we just change a few words from the “general service” page to specifically target hair salons, and somehow avoid Google seeing it as duplicate content? Reminder that these pages will be internal links inside of the hair salon industry page. Thank you in advance for your answers, Gaël
On-Page Optimization | | Gael_Regnault0 -
Will Multiple 301's to the Same URL Cause Issues?
Hey Everyone, We have a client (I don't have permission to disclose) that has just attempted to create better URL's for their site, per our direction. In the process, their website platform kind of took over their renaming attempts and instead of creating the clean, short, descriptive URLs we all wanted, they got convoluted, longer URLs. This all happened within the past 3 or 4 days. So, they went out and got an add-on that's going to help them create better URL's. In the meantime, they now have the original page/URL plus two new ones for a total of three. No 301's have been setup yet. When they create the new and (hopefully) improved URL tomorrow, will it hurt their rankings to have three pages redirected to the new one? Is a 301 redirect the right method for this issue or should they do something different? Thanks in advance, Kirk
On-Page Optimization | | kbates0 -
I still don't understand how rel=canonical works. Help?
So here's the deal. I write for many different outlets. I also have many different pages on my blog that have duplicates (authorized, of course). On my blog, I have many different pages that redirect to "the original" content. I've only recently discovered the existence of rel=canonical. However I don't understand how it works. I have very specific questions. Can anyone help? If, on my blog, I have a blog post that's the original. And another website has the same content, used with authorization. If I want to tell search engines that the original content is on MY blog, what can I do? Is the only solution to ask the owner of the other blog to add a rel=canonical in the header of the specific post? If, on my blog, I have a blog post that's NOT the original. Do I simply add rel=canonical to the header, then add a link to the original in the body? If, on my blog, I have THE FIRST 300 WORDS of a blog post, then add a link saying "to read the whole article, click here" with a link pointing to the original, do I need to have a rel=canonical tag somewhere? Does it HAVE to be in the header? Can rel=canonical be used in the - What penalties are included with having duplicate content of my work everywhere on the web? I've been trying to find specifics, but can't. Thanks for the help. I'm quite confused, as you can see.
On-Page Optimization | | cedriklizotte0 -
With the release of so many domains from .expert through to even .xyz why don't we see many around the top of SERPS?
And should I use one of these to create a nice looking site, invest time, energy, resource, money or will I simply regret it later and stick to the main TLDs? First question on Moz (yey)
On-Page Optimization | | LGG1230 -
Hiding body copy with a 'read more' button
Hi Whats the consequences of hiding half of the lovingly crafted body copy/written content (good quality modern version of what we used to call seo text) i have written for a clients main site sections and then having a 'read more' button to reveal ? I have written 500+ words for each page but client wants to reduce word count displayed since thinks looks too 'wordy'! I know that this is possible and used to be fine if done in a manner that was still crawlable, is this still the case ? Cheers Dan
On-Page Optimization | | Dan-Lawrence0 -
Which URL Structure is best for New Website?
Hello All, I have one client and he want to develop his website but the he want the URL structure for his website page like below: http://www.example.com/category/xxproduct.html But I have suggest him below URL Structure http://www.example.com/category/xx-product.html So Can you people please suggest me that from above which URL structure is better from SEO side as well as from Visual side..? Is using - is better to separate the words in URL?
On-Page Optimization | | jemindesai0 -
Is Googlebot seeing text in my 'Read More' bar and could they even be penalising me for it?
Hi guys. Our web developers have put a read more bar that contains the on page SEO text for our webpage. By default, the read more bar is not expanded and you cannot see the text within. If you click 'Read More', the box expands and the text is shown on the page. I was wondering if googlebot is seeing this text at all - it's really important that it does because it contains all the on-page SEO text. I also wondered if this type of approach is still considered 'white hat'? If it's not, could google be penalising us for it? Thanks,
On-Page Optimization | | CarlDarby0 -
Changing Ttile Tags & 301's
I recently began re-optimizing my title tags site wide. Could this cause 301 redirects and the loss of backlinks?
On-Page Optimization | | BeautyStop0