background preloader

Web server

Facebook Twitter

CloudFlare DNS (recommended by Brad) Mod_rewrite, 301 redirect FAQ. .htaccess mobile browser redirect. This week I bought bitcoin and it was a lot harder than I would have ever thought. With bitcoin being the most popular and valuable fully virtual currency of all time, I expected the process of buying bitcoins to be straightforward. “After all, I can purchase anything from deodorant to diamonds on Amazon at the click of a button, a virtual currency doesn’t involve shipping or handling should even easier,” I thought. Turns out I was completely wrong. My basic expectations were: The transaction should be quick, if not instantaneous, no more than a couple of hours.I should not have to leave my house. Finding a service that fit these criteria was very difficult. I started looking through the options listed on the site and immediately discovered that the usual forms of instant online payment – credit cards, or paypal – seem to be out of the question.

One simple solution to the problem of fraud would be to limit the size of the transactions. .htaccess rewrite tricks. Htaccess Rewrites are enabled by using the Apache module mod_rewrite, which is one of the most powerful Apache modules and features availale.

.htaccess rewrite tricks

Htaccess Rewrites through mod_rewrite provide the special ability to Rewrite requests internally as well as Redirect request externally. When the url in your browser's location bar stays the same for a request it is an internal rewrite, when the url changes an external redirection is taking place. This is one of the first, and one of the biggest mental-blocks people have when learning about mod_rewrite... But I have a secret weapon for you to use, a new discovery from years of research that makes learning mod_rewrite drastically quicker and easier. It truly does or I wouldn't be saying so in the introduction of this article. Despite the tons of examples and docs, mod_rewrite is voodoo.Damned cool voodoo, but still voodoo.-- Brian Moore If you really want to take a look, check out the mod_rewrite.c and mod_rewrite.h files. RewriteRule !

Directives ^ Beginner's guide to mod_rewrite. This article was written in 2002 and remains one of our most popular posts.

beginner's guide to mod_rewrite

If you’re keen to learn more about URLs, you may find this recent article on the “www” prefix, by Craig Buckler, of great interest. So you’re a web developer who has all the bells and whistles on your site, creates Web-based applications that are both beautiful and work well. But what about these issues? Applications Must Be Safe A user must not be able to harm your site in any way by modifying a URL that points to your applications.

For example, imagine we have a simple script that shows all the products in a category. Generally, it’s called like this: myapp.php? But what will this application do if ScriptKiddie(tm) comes and types this in his browser: myapp.php? Well, many of the sites I’ve seen will drop some error message complaining about use of the wrong SQL query, invalid MySQL resource ID, and so on.