Webmaster Tips » PHP
Pramod S Nair
How to Use Mod_rewrite For URL Rewriting in Apache
URL Rewriting is the process of manipulating an URL or a link, which is send to a web server in such a way that the link is dynamically modified at the server to include additional parameters and information along with a server initiated redirection. The web server performs all these manipulations on the fly so that the browser is kept out of the loop regarding the change made in URL and the redirection.
URL Rewriting can benefit your websites and web based applications by providing better security, better visibility or friendliness with Search Engines and helps in keeping the structure of the website more easy to maintain for future changes...
Auto Optimize Your MySQL Tables Script
In my quest to make our clients MySQL driven ecommerce websites running fast, I've pieced together a script and cron job that will save you some support calls down the road..
43 Tips for Optimizing PHP code
Here is the list of 43 short tips you can use for writing an optimized and more efficient PHP code..
Content Compression Using PHP
HTTP 1.0 introduced the idea of content encodings. A browser/client can notify the server that it can accept compressed content by sending the Accept-Encoding header. The Accept-Encoding header can be set as follows
or with just one of gzip or deflate. You don't need to worry about any of this - PHP will automatically choose the correct compression to use.
Compressing content usually results in less data being send across the network. This has three benefits..
3 Simple Ways to restrict access to your webpages using PHP
Why do you need to restrict access to some of your scripts or webpages? There are can be several reasons to do this:
- You can use some open-source php script (for example, statistics frontend), and you can not be fully assured that your data completely safe. Many open-source scripts have vulnerabilities, allowing hackers to gain access to your data, so you may want to hide this script "entry point" from others.
- You can have some important private data you don't want to be accessible by aliens.
So you need to "hide" your pages from search engine spiders, random visitors and other unwanted persons. In this article we'll examine several techniques how you can implement such "access restriction" with PHP..
Regular expressions made easy
Regular expressions is a very powerful instrument to manipulate and extract strings. However not all PHP developers know how to use regular expressions, so this simple tutorial is intended to everyone who wants to learn them.
PHP has several built-in functions for dealing with regular expressions. We'll examine only the PCRE functions (preg_replace, preg_match_all), which use a Perl-compatible regular expression syntax, as they are often faster than POSIX alternatives (ereg, ereg_replace, etc.)..
Nathan C. Dickerson
Apache htaccess for PHP web application deployment
The following is a brief introduction to Apache's htaccess file for web application deployment, distribution, or implementation on shared hosting environments.
The Apache htaccess file is not new; however it seems to only be used by more advanced Apache users and web application developers. This article aims to to point one on the right path to learn about htaccess and Apache directives by outlining how I have used and have seen Apache's htaccess file used in the real world..