Saturday, October 3rd, 2009
The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.
Note: I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance. Feedback would be great if you make it that far..
Tags: admin, advanced, Cookies, debugging, htaccess, mod_rewrite, PHP, phpinfo, WordPress, wp-config.php
Posted in CSS, Cache, Featured, Hacking, Javascript, Linux Unix BSD, PHP, SEO, Security, Server Administration, Shell Scripting, Web Design, Web Hosting, Webmaster, WordPress, WordPress Plugins, htaccess, mod_rewrite | 4 Comments »
Friday, September 11th, 2009
Note: Extremely ILL Content
Find the key to unlocking mod_rewrite and you WILL be sick.. sick with a diamond disease on your wrist!
Tags: advanced, askapache, cheatsheet, howto, htaccess, htaccess rewrite, mod_rewrite, tutorial
Posted in Apache, Apache Modules, Featured, Linux Unix BSD, htaccess | 17 Comments »
Sunday, August 30th, 2009
Web Developers sometimes use file.ext?v=004 as a version control system to force visitors to use updated files. This is terrible. Instead link to apache-003.css and set it to be cached forever. When you change the file you just change the links to apache-004.css. That eliminates millions of bandwidth and resource robbing If-Modified-Since requests. You only need Apache with mod_rewrite, and 1-10 minutes!
Tags: Cache, Cache-Control, caching, htaccess, If-Modified-Since, mod_rewrite
Posted in Apache, CSS, Cache, DreamHost, Featured, SEO, Security, Server Administration, Web Design, Web Hosting, Webmaster, XHTML, htaccess, mod_rewrite | No Comments »
Saturday, June 13th, 2009
Ever wanted to execute commands on your server through php? Now you can. I’m calling this file (see below) shell.php and it allows you to run commands on your web server with the same permissions that your php executable has.
Tags: Ajax, bash, console, Hacking, htaccess, Javascript, linux, mod_rewrite, PHP, Security, Shell, shell console, Shell Scripting
Posted in Ajax, DreamHost, Featured, Hacking, Javascript, Linux Unix BSD, PHP, Security, Server Administration, Shell Scripting, Web Hosting, Web Tools, Webmaster, htaccess, mod_rewrite | 13 Comments »
Saturday, January 10th, 2009
This is not an introduction to .htaccess… This is the evolution of .htaccess… The BEST, the ORIGINAL, the NEWEST, and the most HIGHEST, FLYEST .htaccess tricks I can find.
Originally known as the “Ultimate .htaccess Guide”, its changed over the years by adding new .htaccess tricks and .htaccess examples to it.. I also add my favorite .htaccess links, the best .htaccess articles on AskApache, the coolest .htaccess experiments, the Web’s best .htaccess hacks, and update this article on the regular.
Tags: .htaccess examples, Apache, Cache, caching, Files, FilesMatch, Google, Hacking, howto, htaccess, htaccess guide, htaccess help, htaccess howto, htaccess rewrite, htaccess tricks, htaccess tutorial, httpd, litespeed, mod_rewrite, Mod_Security, rewritecond, rewriterule, sample .htaccess, Security, SEO, seo secrets, SetEnvIf, ssl, ultimate htaccess
Posted in Apache, Apache Modules, Cache, DreamHost, Featured, Google, Hacking, Linux Unix BSD, SEO, Security, Web Design, Web Hosting, Web Tools, Webmaster, WordPress, htaccess, mod_rewrite | 53 Comments »
Friday, December 19th, 2008
This is all new, experimental, and very very cool. It literally uses .htaccess techniques to create several virtual “locked gates” that require a specific key to unlock, in a specific order that cannot be bypassed. It uses whitelisting .htaccess tricks to specify exactly what is allowed, instead of trying to specify everything that isn’t allowed. Also, by setting specific cookies/tokens after successfully passing through a gate, we can then require the exact cookie/token from the previous gate, which stops an attacker from skipping or bypassing gates.
Tags: advanced, Hacking, htaccess, mod_rewrite, phpBB, Security, ssl
Posted in Apache, Featured, Hacking, Security, htaccess, mod_rewrite | 6 Comments »
Saturday, November 22nd, 2008

Well what can I say, other than this is sooo DOPE! Here is a list of the modules this plugin (version 4.7 unreleased) will automatically detect. I compiled the list myself using every module included with any default Apache installation for ALL the versions listed below, 1.3 to 2.2+
Want to know something else I’m including in this plugin? For each and every module that is detected, this plugin can then detect ALL of the modules .htaccess Directives! For instance, RewriteRule, AccessFileName, AddHandler, etc.. are each a directive belonging to a module that is allowed to be used from within .htaccess files.
Talk about sick.. these tricks have the diamond disease!
Tags: Hacking, htaccess, htaccess rewrites, mod_rewrite, Security
Posted in Apache, Cache, Featured, Hacking, PHP, SEO, Security, WordPress, WordPress Plugins, htaccess | 37 Comments »
Monday, October 20th, 2008
This past week I updated my sites apache.css file for a site-redesign. I wanted to make changes to the .css file that only I could see, so that my regular traffic and site-visitors would still see the old version. Here’s the elegant solution I came up with using .htaccess and mod_rewrite that works so well I’m sharing it with all you wonderful and incredible people reading my blog :)
Tags: CSS, htaccess, mod_rewrite, trick, tutorial
Posted in Apache, CSS, Cache, Featured, Web Design, Webmaster, XHTML, htaccess, mod_rewrite | 4 Comments »
Thursday, September 25th, 2008
We’ve figured out what mod_rewrite variables look like, a cheatsheet of the actual value.
Tags: cheatsheet, htaccess, mod_rewrite, mod_rewrite cheatsheet, rewritecond, rewriterule
Posted in Apache, Apache Modules, DreamHost, Featured, Hacking, Linux Unix BSD, SEO, Security, Server Administration, Web Design, Web Hosting, Web Tools, Webmaster, htaccess, mod_rewrite | 3 Comments »
Tuesday, April 29th, 2008
This is freaking sweet if you use SSL I promise you! Basically instead of having to check for HTTPS using a RewriteCond %{HTTPS} =on for every redirect that can be either HTTP or HTTPS, I set an environment variable once with the value “http” or “https” if HTTP or HTTPS is being used for that request, and use that env variable in the RewriteRule.
Tags: htaccess, htaccess rewrite, HTTPS, mod_rewrite, ssl
Posted in Apache, DreamHost, Featured, htaccess | 12 Comments »
Thursday, April 10th, 2008
htaccess rewrite / Mod_Rewrite Tips and Tricks is as glamorous as it sounds! htaccess rewrite mod_rewrite is just possibly one of the most useful Apache modules and features. The ability to rewrite requests internally as well as externally is extremely powerful.
Tags: htaccess, htaccess rewrite, mod_rewrite, Redirecting URLS, rewrite, Rewrite Tricks, rewritecond, rewriterule
Posted in Apache, Cache, DreamHost, Featured, SEO, Security, htaccess | 49 Comments »
Tuesday, April 8th, 2008
Want to block a bad robot or web scraper using .htaccess files? Here are 2 methods that illustrate blocking 436 various user-agents.
Tags: htaccess, mod_rewrite, Security, SetEnvIf
Posted in Apache, Featured, Hacking, Security, htaccess | 15 Comments »
Thursday, February 28th, 2008
Nifty SEO tip to get Search Engine Bots to check your site every hour until you finish working on it and tell them you are finished.
Tags: 503, Google, htaccess, mod_rewrite
Posted in Apache, DreamHost, Featured, Google, PHP, SEO, htaccess | 10 Comments »
Monday, January 7th, 2008
SetEnv, SetEnvIf, and SetEnvIfNoCase directives conditionally set environment variables accessible by scripts and apache based on HTTP Headers, Variables, and Request information.
Tags: Examples, htaccess, mod_rewrite, mod_setenvif, SetEnv, SetEnvIf
Posted in Apache, Apache Modules, Cache, DreamHost, Featured, Hacking, SEO, Server Administration, Webmaster, htaccess, mod_rewrite | 4 Comments »
Thursday, August 9th, 2007
WordPress blogs show the same duplicate content for http://www.askapache.com/index.php and http://www.askapache.com/. If you’ve read about using a robots.txt file for WordPress SEO, than you already understand this setup results in Duplicate Content penalties being levied against your Blog and Web Site by Search Engines.
Tags: htaccess, htaccess rewrite, mod_rewrite, rewriterule
Posted in Apache, DreamHost, SEO, WordPress, htaccess | 7 Comments »
Tuesday, March 6th, 2007
Have you ever wondered how many REQUEST_METHODS you could use in Apache?
Scan Your Site to see what Request Methods are currently allowed, and fix potential security holes.
Intro
The Request Method, as supplied in the REQUEST_METHOD meta-variable, identifies the processing method to be applied by the script in producing a response.
The script author can choose to implement the methods most appropriate for the particular application.
If the script receives a request with a method it does not support it SHOULD reject it with an error.
List of the 27 Request Methods Recognized by Apache
GET
PUT
POST
DELETE
CONNECT
OPTIONS
TRACE
PATCH
PROPFIND
PROPPATCH
MKCOL
COPY
MOVE
LOCK
UNLOCK
VERSION_CONTROL
CHECKOUT
UNCHECKOUT
CHECKIN
UPDATE
LABEL
REPORT
MKWORKSPACE
MKACTIVITY
BASELINE_CONTROL
MERGE
INVALID
GET
The GET method indicates that the script should produce a document based on the meta-variable values. By convention, the GET method is ’safe’ and ‘idempotent’ and SHOULD NOT have the significance of taking an action other than producing a document.
The meaning of the GET method may be modified and refined by protocol-specific meta-variables.
POST
The POST method is used to request the script perform processing and produce a document based on the data in the request message-body, in addition to meta-variable values. A common use is form submission in HTML [18], intended to initiate processing by the script that has a permanent affect, such a change in a database.
The script MUST check the value of the CONTENT_LENGTH variable before reading the attached message-body, and SHOULD check the CONTENT_TYPE value before processing it.
HEAD
The HEAD method requests the script to do sufficient processing to return the response header fields, without providing a response message-body. The script MUST NOT provide a response message-body for a HEAD request. If it does, then the server MUST discard the message-body when reading the response from the script.
OPTIONS
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI. This method allows the client to determine the …
Tags: htaccess, mod_rewrite, Request Method
Posted in Apache, DreamHost, Featured, htaccess | 2 Comments »
Thursday, February 22nd, 2007
Replace underscores in URLs with hyphens using Apache .htaccess.
Tags: htaccess, mod_rewrite, rewriterule
Posted in Apache, DreamHost, SEO, htaccess | 8 Comments »
Sunday, February 11th, 2007
Time-dependant rewriting uses mod_rewrite and apache server time variables to display different files depending on the time, while the URL stays the same. An often requested implementation of this is to display a different home page or image depending on if its morning, noon, or night.
Tags: htaccess, mod_rewrite
Posted in Apache, DreamHost, Featured, SEO, Security, htaccess | No Comments »