Removing non www and index.php
-
Hi,
I'm green when it comes to altering the htaccess file to remove non www and index.php.
I think I've managed to redirect the urls to www however not sure if I've managed to remove the index.php.
I'm pasting the contents of the htaccess file here maybe someone can identify if I have unwanted lines of code and if it is up to standard (there are a lot of comments in #) not sure if needed but I've left them as I don't want to screw up anything. Thanks
@package Joomla
@copyright Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved.
@license GNU General Public License version 2 or later; see LICENSE.txt
READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
The line 'Options +FollowSymLinks' may cause problems with some server configurations.
It is required for the use of mod_rewrite, but it may have already been set by your
server administrator in a way that disallows changing it in this .htaccess file.
If using it causes your site to produce an error, comment it out (add # to the
beginning of the line), reload your site in your browser and test your sef urls. If
they work, then it has been set by your server administrator and you do not need to
set it here.
No directory listings
IndexIgnore *
Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -IndexesMod_rewrite in use.
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/index.php/
RewriteRule ^index.php/(.*) /$1 [R,L]Begin - Rewrite rules to block out some common exploits.
If you experience problems on your site then comment out the operations listed
below by adding a # to the beginning of the line.
This attempts to block the most common type of exploit
attempts
on Joomla!Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]([^)]) [OR]
Block any script that includes a
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 long does Google take to reduce the index size?
A few months ago, we have incorporated our custom search in our website www.ergodotisi.com . We hadn't been paying a lot of attention to our webmaster analytics, to find out a few months later than the Google Index had grown from 2K- 3K pages to one million because it was crawling all combinations of search filters. We have now followed the right instructions to add noindex meta tags and blocked most search result pages from the robot.txt. We allow indexing of some main categories by setting new seo-friendly url structures. A few weeks have passed and the index size has only reduced to 700K. How long does it take before it removes most of the duplicated search result pages from the index? Is it still crawling those pages but has not fully decided to remove most of them? How bad is this for SEO?
On-Page Optimization | | cplastiras840 -
Magento product pages - should they have a .php or .html?
Hi all, I'm using a plugin to do some SEO work on my Magento site It says this is an error: Product pages should have a suitable file type extension such as .php or .html I removed .html when I first set up my store because I though it looked more aesthetically pleasing, but does this have a negative effect on SEO? I can't find much information on this matter in my searches. Can anyone shed any light on this? Thank you, Laura
On-Page Optimization | | llj0 -
How do I remove a Canonical URL Tag?
Some of my report cards say I have too many canonical URL tags. However, there is no information no how to delete one. Can someone give me a link or explain? Thanks.
On-Page Optimization | | dealblogger0 -
Is it redundant to include a redirect to my canonical domain (www) in my .htaccess file since I already have the correct rel="canonical" in my header?
I've been reading the benefits of each practice, but not found anyone mentioning whether it's really necessary to do both? Personally I try to stay clear of .htaccess rewrites unless it's absolutely necessary, since because I've read they can slow down a website.
On-Page Optimization | | HOPdigital0 -
Remove internal site SERPS from Google Index?
1. Internal Serp pages did not have a robots meta tag 2. As a result, client site has thousands (~4,400) of internal site SERP pages in the Google index. 3. We added the NoIndex, Follow attribute to all internal SERPS 4. We Disallowed: domain.com/internal-search-operator in Robots.txt 5. No new SERP pages are being indexed, but the other 4000 something that were already there are still in the index weeks later. 6. The pages are dynamically created and still work, so I can't use the Remove Content tool from google, because the pages don't 404. Is there any way to get these pages out of the index besides just waiting and hoping google eventuall drops them? Thanks
On-Page Optimization | | delegator.com0 -
Should I make All My "Non-Money" Pages No-Follow?
I'm branching out here from my novice seo status . . . In an effort to channel page rank to the pages I wish to rank for should I make all my non-money pages no-follow. Pages like "contact us", "about us", "application", etc. It seems to make sense to make these no follow so the page rank flows to the pages I wish to rank for. Am I on the right track?
On-Page Optimization | | leaseman0 -
How do you create a 301 redirect for www.mysite..com/index.html in htaccess.
I understand that it is possible to create a 301 redirect for www.mysite..com/index.html to www.mysite.com. (as well as subdirectories.) How is this accomplished? My hosting company says that setting this up in htaccess will cause "Apache to geti into an infinite loop and the page won’t load." I have read on the forum that this is possible. Any help would be greatly appreaciated. THanks. Perri
On-Page Optimization | | PerriCline0 -
Are a lot auf tag-sites in the index a bad signal for low quality? (Panda Update)
Hello everybody, first of all please excuse my bad english. I'm from Germany - I try my best. 😉 The case: I have a Wordpress SEO project which rankings very well. A this moment I have all "archive sites" like "archive", "category" und "tags" indexed. I use the more-Tag for every archive/category/tag site - so duplicate content ist not really a problem, but in view of the Panda Update, which surely arrives in Germany soon, I wonder if all this Tag/Archive/Category Sites in the index maybe seen as low quality und can hurt the ranking of my whole site. Low quality because: With using the more-tag the site are just a list of internal links with content snippets. I have 500 articles und 700 Tag Site (all in the index). So my fear is when google (with Panda Update) looks at my site und sees all this (maybe) low quality tag-sites in the index I get penalised because there is not a good proportion between my normal (good quality) Articles und the archive/tag sites. I hope you guys can understand my thoughts. Do I have a legitimate fear that the mass of tag-site in the index could be problem? Are there any data from the USA, how blogs mit Tag-Site in the Index rank after the Panda Update or if sites which contains of internal Links mit content snippets - like these tag site - are low quality in Google eyes? Or I'm worring to much? Thank you very much! Oliver
On-Page Optimization | | channelplus0