background preloader


Facebook Twitter

6 .htaccess Tricks for Better WordPress SEO & Security. Here are six htacccess tricks that will help improve the security and SEO quality of your WordPress-powered site.

6 .htaccess Tricks for Better WordPress SEO & Security

We do this using .htaccess to establish canonical URLs for key peripheral files, such as your robots.txt, favicon.ico, and sitemap.xml files. Canonicalization keeps legitimate bots on track, eliminates malicious behavior, and ensures a better user-experience for everyone. On the menu: Before making changes.. The .htaccess code in this post is designed to work when placed in the web-accessible root .htaccess file of your domain. 1. Help bots and visitors find your robots.txt file no matter what.

. # CANONICAL ROBOTS.TXT <IfModule mod_rewrite.c> RewriteBase / RewriteCond %{REQUEST_URI} ! To use this code, replace with your own domain and include in your web-accessible root directory. RewriteCond %{REQUEST_URI} ! Alternate Method: Instead of using Apache's rewrite module, we can do the same thing with less code using mod_alias: RedirectMatch 301 ^/(.*)/robots\.txt. 5 Fun and Practical Htaccess Solutions. Today we will go over some practical uses of htaccess files that you can use in your web applications.

5 Fun and Practical Htaccess Solutions

Requirements Htaccess files are plain-text configuration files used by the Apache HTTP web server. They allow users to set directory level options without requiring access to the httpd.conf file. As such it is required that your server uses Apache, and a web host that allows htaccess files (the most popular hosts do). I assume a basic working knowledge of htaccess, but if you need to freshen up check out this article by Joseph Pecoraro 1.

Hotlinking, or inline linking, is when one web site links directly to an object on another site. There are ways to fix this growing problem using htaccess. We will step through this line-by-line. First we need to turn on the rewrite engine in Apache, this allows us to redirect the user's request. 2. This is a great little tip if you have a spammer on your website. Using the Order directive in the mod_access module we can specify IPs to deny and allow. 16 Useful .htaccess Tricks and Hacks For Web Developers. Stupid htaccess Tricks. Welcome to Perishable Press!

Stupid htaccess Tricks

This article, Stupid htaccess Tricks, covers just about every htaccess “trick” in the book, and is easily the site’s most popular offering. In addition to this htaccess article, you may also want to explore the rapidly expanding htaccess tag archive. Along with all things htaccess, Perishable Press also focuses on (X)HTML, CSS, PHP, JavaScript, security, and just about every other aspect of web design, blogging, and online success.

If these topics are of interest to you, I encourage you to subscribe to Perishable Press for a periodic dose of online enlightenment ;) General Information [ ^ ] 21 very useful htaccess tips & tricks. htaccess tips tricks. Apache web servers has a great way to manipulate information using .htaccess files. .htaccess (hypertext access) is the default name of a directory-level configuration file that allows for decentralized management of web server configuration.

21 very useful htaccess tips & tricks. htaccess tips tricks

The .htaccess file is placed inside the web tree, and is able to override a subset of the server’s global configuration; the extent of this subset is defined by the web server administrator. The original purpose of .htaccess was to allow per-directory access control (e.g. requiring a password to access the content), hence the name. Nowadays .htaccess can override many other configuration settings, mostly related to content control, e.g. content type and character set, CGI handlers, etc. The Definitive Guide to htaccess Techniques: Do’s and Don’ts - Noupe Design Blog. Aug 10 2009 Of all the elements of web design and coding, htaccess can be one of the most intimidating.

The Definitive Guide to htaccess Techniques: Do’s and Don’ts - Noupe Design Blog

After all, it’s an incredibly powerful tool and one that has the potential to completely break your site if you’re not careful. Below are a dozen basic htaccess techniques and tips to get you started. They’re not nearly as intimidating as many people expect, and if you study the code for a few minutes, I’m sure you’ll quickly grasp exactly how they work and why. After that are a few bewares and don’ts for working with htaccess to help keep you out of trouble, and some more resources for further working with htaccess.