Search Results
Mod_Rewrite Tips and Tricks are lot of .htaccess rewrite examples that show specific uses for creating .htaccess rewrites to do all kinds of cool and
htaccess example file with excellent htaccess sample and examples. Check out the trends on Google for AskApache, Htaccess, Mod_Rewrite, and HTTPD.
.htaccess mod_rewrite rewrite examples. Here are some useful mod_rewrite rewrite examples that you can use in your .htaccess file. Some of my favorites.
Mod_Rewrite Variable Cheatsheet - List of All Variables used by RewriteCond and actual variable Value.
SEO Search Engine Friendly Redirects without mod_rewrite using RedirectMatch and mod_alias.www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html
Advanced mod_rewrite expert or htaccess guru cheatsheet. Master modrewrites and rewriting.
Mod_Rewrite Basic Examples. FREE THOUGHT · FREE SOFTWARE · FREE WORLD. « Commonly Used htaccess CodeLinks to htaccess tutorials and articles »
Htaccess Tutorial with detailed .htaccess file examples, advanced uses and verbose tricks and tips and a helpful rewrites using mod_rewrite for URL
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
This is a really cool idea I had to make my Apache .htaccess mod_rewrite code much shorter and easier to manage multiple Redirections when using sites with
Cookie Manipulation in .htaccess with RewriteRule Got some fresh .htaccess and mod_rewrite code for you! Check out the Cookie Manipulation and Tests using
301 Redirect with mod_rewrite or RedirectMatch. The Apache Web Server provides a couple ways to issue 301 Redirects from within .htaccess or httpd.conf www.askapache.com/htaccess/301-redirect-with-mod_rewrite-or-redirectmatch.html
Redirect with mod_rewrite in apache htaccess. See also Ultimate Apache htaccess . Which would be the preferred redirect method:PHP or Mod Rewrite ? Why? www.askapache.com/htaccess/list-of-methods-to-redirect-users-to-different-page.html
Permalink:/%postname%/ Writable .htaccess file found mod_rewrite not found Not using pathinfo style index permalinks Using mod_rewrite permalinks
The fix is a bit of clever .htaccess code utilizing mod_rewrite to only redirect index.php if the request for /index.php came from a client (e.g. browser or
Oct 20, 2008 Web Developers sometimes use file.ext?v=004 as a version control system to force visitors to use updated files eliminates millions of www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html
You need an .htaccess that is created/modified by wordpress via the Permalink/mod-rewrite option. Go to Options>Permalinks in the wordpress administration www.askapache.com/htaccess/redirecting-wordpress-feeds-to-feedburner.html
Jul 10, 2007 Use this mod_rewrite code in your .htaccess file to find out what your servers current variables are. Simply uncomment whichever line (one
Mod_Security uses Regex and .htaccess / httpd.conf directives similar to mod_rewrite, allowing for complete control from within .htaccess files and
Great .htaccess tutorial showing how to set a cookie, and then based on that cookie use mod_rewrite rewrites to set environment variables that can then be
This htaccess tutorial has htaccess example code to make it easy to secure and use HTTPS and Mod_Rewrite Tips and Tricks ·Crazy Advanced Mod_Rewrite
Advanced Mod_Rewrite Anti-Hotlinking Example to Protect Files.
@Spencer:no it doesnt ( for I've seen in my own htaccess files ). However for human reading purposes you might put your normal mod rewrite rules (SEO urls) www.askapache.com/htaccess/blocking-bad-bots-and-scrapers-with-htaccess.html
PHP htaccess tips and tricks. FREE THOUGHT · FREE SOFTWARE · FREE WORLD. « Manipulating HTTP Headers with htaccessSEO Redirects without mod_rewrite »
Control htaccess Basic Authentication with PHP and mod_rewrite.www.askapache.com/htaccess/tricks-for-controlling-htaccess-basic-authentication-with-php-and-mod_rewrite.html
Custom PHP.ini with FastCGI on DreamHostControl htaccess Basic Authentication with PHP and mod_rewrite » ·Rewrite underscores to hyphens for SEO URL www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html
Any htaccess rewrite examples should always begin with .. We are using Apache 2 for secure mode and using MOD jk to redirect our request to tomcat 6.0.
If using phpbb:Removing SID for guests and using phpBB SEO mod rewrites gives you an htaccess like this- RewriteEngine On RewriteBase / RewriteRule ^s/(. www.askapache.com/;using-last-modified-etag-mod_expires-mod_headers-to-seo-phpbb.html
Variables in the URL which are not regular ?foo=bar variables won't work without using (mod_rewrite);Custom php directives in .htaccess files
htaccess Guide. htaccess tricks for Webmasters ·HTTP Header control with htaccess ·PHP on Apache tips and tricks ·SEO Redirects without mod_rewrite
Mod_Rewrite Tips and Tricks ·Crazy Advanced Mod_Rewrite Bobby, create an .htaccess file in your wp-admin directory following the contents listed in
SEO Redirects without mod_rewriteApache Authentication in htaccess » Caching with .htaccess and Apache will take your website and your web skills to the www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html
27 Request Methods for Apache rewritecond htaccess. FREE THOUGHT · FREE SOFTWARE · FREE WORLD. « 301 Redirect with mod_rewrite or RedirectMatchUse php.ini www.askapache.com/htaccess/27-request-methods-for-use-with-apache-and-rewritecond-and-htaccess.html
The Ultimate htaccess Examples – The most-requested and best example htaccess code;URL Rewriting tutorial – Tutorial on how to use mod_rewrite to rewrite
YAhoo uses Apache for its php. But without .htaccess file, is there any other way to 1. 301 redirect the previous pages to the new ones, and 2. mod-rewrite
htaccess mod_rewrite rewrite examples Thishtaccess rewrite example invisibly rewrites requests for all Adobe pdf files to be handled by
Nov 22, 2008 Mod_Rewrite Tips and Tricks ·Crazy Advanced Mod_Rewrite .. I found that they process new htaccess files and edits only once per hour www.askapache.com/htaccess/htaccess-plugin-blocks-spam-hackers-and-password-protects-blog.html
Commonly Used htaccess Code. FREE THOUGHT · FREE SOFTWARE · FREE WORLD. « Set Environment Variables According To URLMod_Rewrite Basic Examples »
Mod_rewrite provides system-variables for exactly this purpose. .htaccess, apache-htaccess, htacess, htacces, htaccess, apache, rewriterule, rewriteengine www.askapache.com/htaccess/using-time_hour-and-time_min-rewritecond-in-htaccess-2.html
Additional and detailed info on each htaccess code snippet can be found at form of TestString in the RewriteCond allows mod_rewrite's rewrite engine to
Apache For Webmasters is some of my favorite htaccess examples from some of my favorite Redirect all but 1 IP to different site, using mod_rewrite
Links to htaccess tutorials and articles. FREE THOUGHT · FREE SOFTWARE · FREE WORLD. « Mod_Rewrite Basic Examples12 Lessons for Those Afraid of CSS »
We will use a bit of mod_rewrite code in a .htaccess file to send google and other search engine bots the 503 Service Temporarily Unavailable header,
Mod_Rewrite Tips and Tricks ·Crazy Advanced Mod_Rewrite This (HTTP Cache-Control w .htaccess) is just what I am looking for to add to my server,
Other Examples using Files and FilesMatch in htaccess Mod_Rewrite Tips and Tricks ·Crazy Advanced Mod_Rewrite ·THE Ultimate Htaccess ·THE Mod_Rewrite
This .htaccess mod_rewrite code goes in your sites root .htaccess file and uses a RewriteCond to make sure that the file exists, it then rewrites the
On on of my secure sites, lets say https://www.askapache.com/htaccess/ I From what I understand you imply that you can use mod_rewrite as mod_proxy.
Apache Directives for .htaccess and Loaded Modules for DreamHost Web mod_rewrite:Provides a rule-based rewriting engine to rewrite requested URLs on
Tags:Apache, askapache, GET, Google, Htaccess, httpd, httpd.conf, Mod_Rewrite, Mod_Security, Perl, PHP, ram, Rewrite Tricks, Security, SEO, server,
See the RewriteCond directive of mod_rewrite for extra information on how to I would like to be able to make .htaccess directives on a number of sites
Did you mean to search for:htaccess+mod_rewrite
#### No https except to wp-admin -
# If the request is empty ( implies fopen or normal file access by a php script )
RewriteCond %{THE_REQUEST} ^$ [OR]
# OR if the request if for wp-admin or wp-login.php
RewriteCond %{REQUEST_URI} ^/(wp-admin|wp-login\.php).*$ [NC,OR]
# OR if the Referer is https
RewriteCond %{HTTP_REFERER} ^https://www.askapache.com/.*$ [NC]
# THEN skip the following rule, basically all this does is force https or badhost to be redirected
# BUT because of the above 3 rewritecond's, this won't break poorly written admin scripts
RewriteRule .* - [S=1]
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://www.askapache.com%{REQUEST_URI} [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*|wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Tags: AddHandler, Apache, Backups, Block IP, Cache-Control, cheatsheets, developers, errordocument, etag, htaccess tricks, http cookie, indexes, Mod_Security, open source, password protection, real world, rewritecond, rewriterule, Source Code
Posted in Apache, Apache Modules, Cache, DreamHost, Featured, Hacking, Htaccess, Linux Unix BSD, Mod_Rewrite, SEO, Security, Server Administration, Web Hosting, Webmaster | Published on 04/17/2010 |4 Comments »
Learn how to setup, configure, secure, optimize, and create a low-maintenance website the AskApache way. I’m piecing together all the hacks, tricks, methods, and ideas discussed throughout this blog and all across Netdom and glueing them all together to show you how to have the most optimized, crazy fastest, and best website setup I can think of.
Tags: 301 Redirect, admin, Advanced, Ajax, Apache, apache server, askapache, Backups, Bandwidth, bleeding edge, blog, Cache, Cache-Control, caching, ColdFusion, compression, CSS, Dig, DNS, errordocument, Etags, Examples, expires header, feed, File Permissions, Flash, GET, Hacking, hacks, Htaccess, htaccess files, Htpasswd, HTTP Error, HTTP Headers, HTTP Status Codes, HTTPS SSL, Javascript, Linux, Login, Logs, Mod_Rewrite, Optimization, optimizations, optimized website, password, password protection, PDF, Performance, PHP, php.ini, Port, post, ram, real deal, Redirect, Redirection, Rewrite Tricks, Robot, robots, robots.txt, Scripts, search and replace, Security, server, server config, servers, SPEED, SSI, stat, SymLinks, trial and error, trick, Web Development, Web Hosting, web server, WordPress, WordPress Plugins
Posted in Apache, Cache, DreamHost, Featured, Hacking, Htaccess, Linux Unix BSD, PHP, SEO, Security, Shell Scripting, Web Design, Web Hosting, Webmaster, WordPress | Published on 02/18/2010 |9 Comments »
Hi there, do you want help with a project (SEO, site/server optimization, setup, wordpress plugin development, other programming, server issues, security issues, etc.) or need some expert consulting? I’m very comfortable working freelance for clients from all across the globe. I enjoy helping good causes or sites/webmasters similar to mine, and I enjoy making new friends and networking. Personally, I love to chat on the phone or instant message with fellow webmasters and web entrepreneurs, and I like networking with like-minded individuals. Once my services are retained we will communicate any way that works best for you.. Billing is pretty…
Tags: Apache, askapache, Email, GET, Htaccess, HTTPS SSL, Mod_Rewrite, Networking, Nice, Optimization, Performance, Port, ram, Rewrite Tricks, Security, SEO, server, SSI, stat, WordPress
Posted in | Published on 09/04/2009 |No Comments »
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: Apache, askapache, Bandwidth, Cache, Cache-Control, caching, Cookies, CSS, GET, Htaccess, HTTP Headers, httpd, httpd.conf, If-Modified-Since, Javascript, Last-Modified, Mod_Rewrite, Redirect, Rewrite Tricks, rewritecond, rewriterule, server, Source Code, SPEED, stat, trick
Posted in Apache, CSS, Cache, DreamHost, Featured, Htaccess, Mod_Rewrite, SEO, Security, Server Administration, Web Design, Web Hosting, Webmaster, XHTML | Published on 08/30/2009 |2 Comments »
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: 302 Redirect, 403 Forbidden, Ajax, Apache, Apache Htaccess, askapache, Backups, bash, chmod, console, errordocument, Flash, GET, Hacking, Htaccess, htaccess tutorial, HTTP-EQUIV, Javascript, Linux, Login, Mod_Rewrite, password, PHP, Port, ram, Redirect, Rewrite Tricks, rewritecond, rewriterule, Scripts, Security, server, Shell, shell console, shell script, Shell Scripting, SSI, stat, tutorial
Posted in Ajax, DreamHost, Featured, Hacking, Htaccess, Javascript, Linux Unix BSD, Mod_Rewrite, PHP, Security, Server Administration, Shell Scripting, Web Hosting, Web Tools, Webmaster | Published on 06/13/2009 |15 Comments »
The story behind this plugin is sorta wack, but in a good way :). While doing tons of security research on permissions, authorization, access, etc.. for the Password Protection plugin (still being worked on), I needed to have unheard of debugging capabilities while working on the plugin on the various websites, webhosts, and test servers that I use to test in different environments. So I hacked together a bunch of php code that helped me debug, actually I pretty much went overkill and tried to get as much debugging info as programmatically possible, and it ended up being so much code that I took it out of my Password Protection code and made it its own plugin.
Tags: admin, Ajax, Apache, Apache Modules, askapache, authorization, Cache, chmod, Cookies, debugging, error log, fifo, File Permissions, GET, Htaccess, Login, Nice, password, password protection, PHP, php.ini, phpinfo, Port, post, ram, Rewrite Tricks, Security, server, servers, Socket, SSI, stat, umask, Username, WordPress, WordPress Development
Posted in WordPress, WordPress Plugins | Published on 04/05/2009 |1 Comment »
htaccess vs. httpd.conf
Tags: Apache, askapache, GET, Google, Htaccess, httpd, httpd.conf, Mod_Rewrite, Mod_Security, Perl, PHP, ram, Rewrite Tricks, Security, SEO, server, servers, stat
Posted in Apache, Google, Htaccess, PHP, SEO | Published on 03/29/2009 |1 Comment »
Skip this – still under edit
I discovered these tips and tricks mostly while working as a network security penetration specialist hired to find security holes in web hosting environments. Shared hosting is the most common and cheapest form of web-hosting where multiple customers are placed on a single machine and “share” the resources (CPU/RAM/SPACE). The machines are configured to basically ONLY do HTTP and FTP. No shells or any interactive logins, no ssh, just FTP access. That is when I started examining htaccess files in great detail and learned about the incredible untapped power of htaccess. For 99% of the worlds best Apache admins, they don’t use .htaccess much, if AT ALL. It’s much easier, safer, and faster to configure Apache using the httpd.conf file instead. However, this file is almost never readable on shared-hosts, and I’ve never seen it writable. So the only avenue left for those on shared-hosting was and is the .htaccess file, and holy freaking fiber-optics.. it’s almost as powerful as httpd.conf itself!
Most all .htaccess code works in the httpd.conf file, but not all httpd.conf code works in .htaccess files, around 50%. So all the best Apache admins and programmers never used .htaccess files. There was no incentive for those with access to httpd.conf to use htaccess, and the gap grew. It’s common to see “computer gurus” on forums and mailing lists rail against all uses and users of .htaccess files, smugly announcing the well known problems with .htaccess files compared with httpd.conf – I wonder if these “gurus” know the history of the htaccess file, like it’s use in the earliest versions of the HTTP Server- NCSA’s HTTPd, which BTW, became known as Apache HTTP. So you could easily say that htaccess files predates Apache itself.
Once I discovered what .htaccess files could do towards helping me enumerate and exploit security vulnerabilities even on big shared-hosts I focused all my research into .htaccess files, meaning I was reading the venerable Apache HTTP Source code 24/7! I compiled every released version of the Apache Web Server, ever, even NCSA’s, and focused on enumerating the most powerful htaccess directives. Good times! Because my focus was on protocol/file/network vulnerabilites instead of web dev I built up a nice toolbox of htaccess tricks to do unusual things. When I switched over to webdev in 2005 I started using htaccess for websites, not research. I documented most of my favorites and rewrote the htaccess guide for webdevelopers. After some great encouragement on various forums and nets I decided to start a blog to share my work with everyone, AskApache.com was registered, I published my guide, and it was quickly plagiarized and scraped all over the net. Information is freedom, and freedom is information, so this blog has the least restrictive copyright for you. Feel free to modify, copy, republish, sell, or use anything on this site ;)
Tags: .htaccess examples, 301 Redirect, 302 Redirect, 401, 403 Forbidden, 404 Not Found, 500, 503, admin, Advanced, Apache, Apache Htaccess, apache ssl, askapache, ASP, authorization, Backups, Bandwidth, bash, Blocking, Boot, Cache, Cache-Control, caching, cheatsheet, chmod, code snippets, compression, Cookies, CSS, debugging, DreamHost, Email, error log, errordocument, Etags, Examples, experiments, feed, FeedBurner, File System, FilesMatch, filesystem, Firefox, Flash, Forms, GET, Google, Hacking, hotlinking, HowTo, Htaccess, htaccess files, htaccess guide, htaccess rewrite, htaccess tricks, htaccess tutorial, Htpasswd, HTTP Error, HTTP Headers, HTTP-EQUIV, httpd, httpd.conf, HTTPS SSL, hyper text transfer protocol, If-Modified-Since, Javascript, Last-Modified, Linux, Login, Logs, mad skills, mod_include, mod_python, Mod_Rewrite, Mod_Rewrite examples, Mod_Security, Mod_Setenvif, mysql, Nice, nsa, password, password protection, PDF, Performance, Perl, PHP, php.ini, phpinfo, Port, post, Powweb, Prompt, Python, ram, Redirect, Redirection, Request Method, Rewrite Tricks, rewritecond, rewriterule, Robot, robots, Sample .htaccess, Scripts, Security, SEO, seo secrets, server, server config, servers, SetEnvIf, Shell, Socket, Source Code, SPEED, SSH, SSI, stat, SymLinks, trick, tutorial, ultimate htaccess, Username, Web Hosting, WordPress
Posted in Apache, Apache Modules, Cache, DreamHost, Featured, Google, Hacking, Htaccess, Linux Unix BSD, Mod_Rewrite, SEO, Security, Web Design, Web Hosting, Web Tools, Webmaster, WordPress | Published on 01/10/2009 |66 Comments »
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: 302 Redirect, 401, 403 Forbidden, 404 Not Found, 500, 503, Advanced, Apache, askapache, Cookies, Dig, errordocument, GET, Google, Hacking, Htaccess, htaccess tricks, Htpasswd, httpd, HTTPS SSL, Linux, Login, Mod_Rewrite, password, PHP, phpBB, post, Prompt, ram, Redirect, Rewrite Tricks, rewritecond, rewriterule, Security, server, SetEnvIf, Sniffing, SSI, stat, trick, WordPress
Posted in Apache, Featured, Hacking, Htaccess, Mod_Rewrite, Security | Published on 12/19/2008 |7 Comments »
A list of API Versions and the corresponding HTTPD Version, for use in determining the version of Apache currently running without having to rely on the often inaccurate SERVER_SOFTWARE Header.
Tags: 503, Advanced, Apache, Apache Modules, askapache, Htaccess, httpd, Module API, Mod_Rewrite, Rewrite Tricks, rewritecond, server, SSI, stat, trick, tutorial
Posted in Apache, Apache Modules, Htaccess, Mod_Rewrite | Published on 11/25/2008 |1 Comment »
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.
Tags: Advanced, Analytics, Apache, askapache, bash, Cache, caching, compression, curl, debugging, DNS, Google, Google Analytics, Htaccess, Javascript, Mod_Rewrite, Nice, Pipelining, Port, Renice, Rewrite Tricks, Scripts, server, servers, Shell, shell script, Shell Scripting, SPEED, SSI, umask, Web Hosting
Posted in Apache, Cache, Javascript, Linux Unix BSD, Shell Scripting, Web Hosting | Published on 10/01/2008 |5 Comments »