What they say about kung-fu is true..
It can be attained by anyone through hard work over time. You can become as good as the amount of work you put in. Here's a short look at a basic technique that I use. Simply reverse engineering the source code and taking notes along the way...
static void php_session_send_cookie(TSRMLS_D)
if (SG(headers_sent)) {
if (output_start_filename) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send session cookie - headers already sent by (output started at %s:%d)",
output_start_filename, output_start_lineno);
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot send session cookie - headers already sent");
}
return;
}
/* URL encode session_name and id because they might be user supplied */
e_session_name = php_url_encode(PS(session_name), strlen(PS(session_name)), NULL);
PHP PHP Session Session ID
Turns every 404 Not Found error into a SEO traffic generating event! Help your site visitors find what they were looking for automatically by leveraging both Google and WordPress. It's one of about 6 plugins I use on every WP site I run. Highly recommend you try it for a few months.
«Take My 404 for a Test-Drive
SEO 404 Google 404 SEO wordpress WordPress Plugin
FeedBurner is so RAD! I love it. Here's an alternative method to redirect scrapers and feed requests to your feedburner url, in my case, I use Branding by feedburner, which is so hot, taking advantage of CNAMEs in your DNS record.
Htaccess
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.
SEO
Optimizing the position, color, and size of AdSense Ads is confusing. The REAL way to optimize AdSense for clicks and revenue is using variations and measuring the results.
WordPress
Check out this free online SEO site-scoring tool. The SEO generated report is simple, neat, and helpful. The main thing I like about it is how it is a stand-alone website, a residual money making machine.
Software
I'm really sorry but I had to disable the sites you had running under
user $USER because that was the only way I could keep the associated
processes from restarting themselves and making the server unstable.
Please do not run these sites with a persistent php.cgi process with a
php.ini file as an argument. Shell Scripting
High Performance Web Site list of the best and newest methods to make web pages super fast using caching, compression, cache-control, etc. Optimization
Both of these pcs were behind a hardware/software firewall, and so each had their own host names, we'll say PEPSI and COKE, and they were both on a private network on the same subnet, so each belonged to a domain called MARKETING. Hacking
If your WordPress blog uses AdSense, and you love Firefox you will love this plugin. When a user downloads and installs Firefox through your referral, we'll credit your account with up to $1.00 (more details).
WordPress
The secrets in this post were really more of enlightening bits of seo wisdom. The secret is how to combine robots.txt with meta robots tags to control pagerank, juice, whatever.
SEO
WordPress robots.txt file can make a huge impact on your WordPress blogs traffic and search engine rank. This is an SEO optimized robots.txt file. SEO robots.txt
Hacking
While testing the exploitability of your target and mapping out vulnerabilities it is important to gain access inside the targets defenses so that you can establish an internal foothold like a owned box or switch. This is so you can use a tool to discover the packet-filtering being used, and literally map out the firewall/IDS rules. Needless to say that really provides you with a lot more complete vulnerability assessment to help discover more weak spots in the system.
Security
This quick tutorial will show you the steps to change and reset any user password on a windows computer, and also show you how to protect your computer from people doing this to you!
Hacking
htaccess rewrite Master Class! If you understand the basics of mod_rewrite, or if you literally write the mod_rewite.c code, this article will transform your thinking. The transformation is profound. Deeply effective. Culmination of the best of the best mod_rewrite tricks for understanding and learning exactly what rewrite is doing.
Htaccess Htaccess mod_rewrite PHP RewriteCond RewriteRule
Check out ReadWriteWeb's fantastic list of uniquely useful search engines, its a lot of fun!
Google
One way I speed up AskApache.com is by downloading external third-party javascript files to host on my own server instead of externally. In addition to the obvious speed boost, this lets you configure the caching and compression settings for the files.
Javascript
Disable caching on WordPress index pages when using WP-Cache with this neat mod to the famously speedy cache plugin.
WordPress
On-Demand WordPress MySQL database Backup Shell Script for DreamHost Shell Scripting
I was over at Alex King's blog today checking out his mobile web plugin for wordpress and I noticed some fresh podcasts from some of the industry's finest. The feeds are .mp3 and are easy to find and browse on the search-this.com site. They have some pretty nice articles over there as well..
Web Design
Windows Batch File
Fresh .htaccess code for you! Check out the Cookie Manipulation and environment variable usage with mod_rewrite! I also included a couple Mod_Security .htaccess examples. Enjoy!
Htaccess
Fast, HTTP Protocol, protection. If you are reading this article, you already know enough about the benefits of making sure your site can handle HTTP Protocol Errors. This is a nice single php file with no dependencies or requirements, will work on anything. Optimized for minimizing bandwidth and resource-hogging connections from bots and spambots.
<?php
ob_start();
@set_time_limit(5);
@ini_set('memory_limit', '64M');
@ini_set('display_errors', 'Off');
error_reporting(0);
PHP ErrorDocument HTTP PHP
It shows a semi-transparent box on the document you are viewing that tells you if its a page, single, feed, category, etc..
WordPress
So, here's what I hacked together last night, that is being used today. It's essentially 2 files.
- A php file that scrapes uses curl to scrape all the urls for the page (favicon, css, images, pdfs, etc..)
- A simple bash shell script acting as a cgi that creates a zip file of all the urls, and a self-extracting exe file for those without a winzip tool
PHP Htaccess HTTP PHP
WordPress blogs show the same duplicate content for https://www.askapache.com/index.php
and https://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.
Htaccess
Web Design
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!
Htaccess Apache HTTP Server Cache Caching Htaccess httpd.conf
can you please suggest me any tiny and good port redirector
for linux and unix like oses ?
so that when I connect to the box to a given port it redirects my connection
to another box and port that I can chose ?
thanx a lot Security
One of the biggest speed bottlenecks of sites today are images, specifically unoptimized images or large scaled images. With Apaches Rewrite module we can convert all existing jpegs and png files (and most gifs) to webp, then transparently rewrite them so that a request for img.png from a browser that supports webp will receive img.webp.
Hosting, Htaccess, Optimization accept Header png RewriteCond RewriteRule vary webp
FallBackResource is a great alternative to using mod_rewrite to direct Apache to send all requests for non-existing files/directories to a script in WordPress. Htaccess and Server Config enabled.
Apache, httpd 2.4 FallbackResource Htaccess mod_dir mod_rewrite RewriteBase RewriteRule wordpress
I looked at a lot of different ways to display quotes and pullquotes and even though the javascript solutions are very nice, esp. the 456bereastreet.com solution, I decided to just use CSS (Keep It Simple Stupid).
CSS
Software
The collusion add-on for Firefox is super-legit. Just navigate to any website normally, then just click the little collusion icon in the status bar and a full detailed report pops up in a new tab describing all the sites that the current site shared your data with (shared as in connected).
View the full introduction to Collusion on mozilla.org, or view my Firefox Add-on Collection: AskApache Web Development (Advanced)
Software Add-on Collusion Cookie Firefox Mozilla Privacy
Example shell scripts (bash or sh) that automate and easyate tasks from within the dreamhost ssh env
Shell Scripting
Replace underscores in URLs with hyphens using Apache .htaccess.
Htaccess
Caching with .htaccess and Apache will take your website and your web skills to the next level. This is some technical and advanced methods condensed to simple htaccess code examples for you.
Hacking Cache-Control cheatsheet Htaccess
Control htaccess Basic Authentication with PHP and mod_rewrite Htaccess
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.
Hacking AJAX PHP