"translation" of code in htaccess file
-
Hi everyone!
I am a newbie to the whole SEO and html thing and I am trying to get a better understanding of the "behind the scenes" part of my website. I hope I can find someone here who can translate a piece of code for me that I have in my htaccess file:
Options -Multiviews
Options +FollowSymLinks
rewritecond $1 !^(index.php|public|tmp|robots.txt|template.html|favicon.ico|images|css|uploads)
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule ^(.*)$ index.php?link=$1 [NC,L,QSA]I know that something is getting redirected to the index file, but what (or when) exactly? Does the word "robots"mean that search engine crawlers are getting redirected here? And is this good or bad (in terms of SEO)? Or is this redirecting people who try to get to my robots/ template or image files??
Thanks in advance for any answers!
-
Hi lynnp!
Thanks for explaining! That was very helpful.
-
It should be redirecting to index.php as long as a number of conditions are met:
rewritecond $1 !^(index.php|public|tmp|robots.txt|template.html|favicon.ico|images|css|uploads)
As long as the requested url does not start with one of: index.php, public, tmp, robots.txt, template.html, favicon.ico, imagesloss, uploads and,rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
As long as the requested url is not an existing file or directoryThen:
rewriterule ^(.*)$ index.php?link=$1 [NC,L,QSA]
Rewrite the url to index.php?link=REQUESTED-URL (along with any other url variables) and stop processingSo you should be seeing urls something like index.php?link=page.php or similar if the conditions above are met.
robots.txt is not being redirected since it is being specifically excluded in the first line.Think I got that right, hope it makes sense!
-
As far as I can tell from checking this snippet it is NOT redirecting traffic to your index.php file and public/tmp/ and a couple of more directories. I'm not that familiar with Apache environments, somehow more Nginx so I can't help you with the other three lines.
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 including "Contact Me" form degrade Google page ranking?
I have a content-rich page about one of my offerings. Will Google knock down the ranking if I include a contact me reply form on the page vs including a link to a standalone reply page? My concern is that including the form will cause Google to downgrade the page as being "too commercial".
On-Page Optimization | | Lysarden0 -
Sale page ranking for "[blank] for sale" keywords
My company's Ecommerce site has a sale category that is currently out performing some of our normal categories in the SERPs for "[blank] for sale" keywords. For example the sale category landing page is ranking for the keyword "vegetable seeds for sale" rather than the vegetable seed category. Has anyone ever dealt with a similar situation to this? or does anyone have general advice for optimizing (or weakening) sale pages?
On-Page Optimization | | Scoleman1 -
Translated the site but traffic is not coming
Hi, We've build a lawyer directory website (www.iranianlawyers.com) which already has good Google rankings for related terms (Ex. Iranian lawyers, Iranian lawyers california, etc). About 1.5 months ago we translated the site to Farsi and published it online: www.iranianlawyers.com/farsi However we have yet to see any new traffic generated from those pages. The website has a decent back-link profile and there are no almost no competitors in our space with translated pages. Would someone please take a look at our translated pages and let me know if there are any major on-site issues that you see that we need to address? I've checked for noindex or nofollow tags but they dont seem to be an issue. Not sure if I'm missing something here. Thank you very much
On-Page Optimization | | Heydarian0 -
How do I "leverage browser caching"
Google is telling me to "leverage browser caching" and put a freshness factor of 1 week on images used on my site. http://www.1stclassdriving.co.uk.
On-Page Optimization | | brianw10
Try as i may I cannot find out how to do this. I'm running two sites - http://www.1stclassdriving.co.uk. on a shared hosting package with Easyspace and http://www.croydondrivingschool.co.uk with Fasthosts, both under windows with asp scripting. Can anyone point me to any tutorials or guide me as to how I do this please0 -
Solve "Too many links on page"
Hello, I own a Opencart site with a lot of products , I am getting this error in the campaign report, how can I fix it? Read other members replys but I dont understand how .. I would appreacite if you could explain it easy because my native language is spanish and my english is really poor I am really happy of find this site, incredible quality, thank you very much!
On-Page Optimization | | matiw0 -
Should ".html" in the URL or not?
Does URL like /wedding-dresses.html/f/price/2,100 with "html" in the middle do harm to SEO? Should I drop the ".html"?
On-Page Optimization | | StevenRoland0 -
Www vs "non" www site addresses and SEO
I first apologize for the lame question title - didn't really know how to word it... I'm having a bit of a conundrum and cannot figure out whats going on, but in the mean time I thought I would ask to see if its hurting my ranking. My site at www.ap-mg.com is built on WordPress using the Thesis them by DIY (just a little upfront info). I am very careful to make sure that all my links are in a particular format i.e. http://www.ap-mg.com - on my site, as well as other sites I have my profile on. My site also used to be hosted on the /home directory until about a month ago. My problem is that when I click on the DA MoxBar link while at my sites homepage, it takes me to Open Explorer, but to ap-mg.com and shows no results - I then add the www to the front of the address and vuala - results. But then the second issue I'm having is then it tells me that my site is redirecting the the /home directory, which its not and I'm still trying to figure that one out. So with all the craziness with my site, www, no www, /home....is this killing any chance of real ranking?
On-Page Optimization | | apmgsmith0 -
Transition between a blog to e-commerce webshop, will my domain "lose" authority
Hi Seomoz'ers, Currently I am analyzing the best possible strategy which situation is as follow: I am having a blog with a great EMD about a specific product we are selling. The blog is currently ranking in position 1 for different keyword phrases. However I would like to make a switch from the current Wordpress blog to Magento webshop. Simply because the product should be sold through a professional webshop with many related products. Only the homepage of mydomainname.com is optimized. I am affraid I will lose my #1 ranking when I put my webstore online on this domainname. Most likely I will lose my PA and keep my DA. Which actions should I take in order to keep the ranking in Google position 1 with the new webstore? My best possible option I guess: 1. Replace the Wordpress blog with the Magento webstore and optimize the homepage with on-page seo of the webstore for the targeted keywords. Will this work? As the backlinks I've built are pointing all to the domainname.com (homepage). Thanks in advance. Any more suggestions are welcome 🙂
On-Page Optimization | | Falcopa0