MOD_REWRITE for Dummies

Written by Bobby Handzhiev

A short article in human language

This article is not a complete quide to Apache's mod_rewtite neither to .htaccess. Its purpose is to help you -repparttar webmaster - to create "mod_rewriten" versions of your dynamic webpages even if you have limited technical knowledge. I won't show you allrepparttar 143666 tips-and-tricks - my aim is to bring allrepparttar 143667 complexity ofrepparttar 143668 Apache's documentation to 1-2 pages of human lanuage - easy and fast.

What is mod_rewrie?

Mod_rewrite is Apache extension which allows you to "rewrite"repparttar 143669 URLs of your web pages. If your server supports this technology (most linux webhosts do nowadays) you are able to rewrite virtually any URL into anything you like. Most often it is used to rewriterepparttar 143670 URLs of dynamicly generated webpages such as This can easy be 'translated' into

Why mod_rewrite?

- Search engine optimization - there are a lot of debates on this topic, but it is still true thatrepparttar 143671 static-looking links rank better thanrepparttar 143672 dynamic ones. Here is a comfirmation from Google on that topic:

"Your pages are dynamically generated. We're able to index dynamically generated pages. However, because our web crawler could overwhelm and crash sites that serve dynamic content, we limitrepparttar 143673 number of dynamic pages we index. In addition, our crawlers may suspect that a URL with many dynamic parameters might berepparttar 143674 same page as another URL with different parameters. For that reason, we recommend using fewer parameters if possible. Typically, URLs with 1-2 parameters are more easily crawlable than those with many parameters."

- User-friendlyness - Some users rememberrepparttar 143675 URLs visally. Even if they bookmark, they can easier recognize a link like than for example.

- Security - mod_rewrite helps you hiderepparttar 143676 parametters passed inrepparttar 143677 application. Basicly your dynamic pages should be secure enough even without mod_rewrite. But hidingrepparttar 143678 parametters will decreaserepparttar 143679 danger of attack

How to use it? Mod_rewrite is really powerful if you are familiar withrepparttar 143680 regular expressions which it uses. But learningrepparttar 143681 whole pattern syntax can be quite complicated, especially forrepparttar 143682 non-technical user. Thats why i'll teach you at several simple patterns which are pretty enough to get your website URLs rewritten.

Lets start: First you need to create a file called .htaccess and place it exactly inrepparttar 143683 folder where you wantrepparttar 143684 rewriting to take effect (it will also take effect over all subfolders). In case you already have a .htaccess file you can simply addrepparttar 143685 lines to it (if it already has mode_rewrite directives you can mess them however). Open it in a simple text editor an start with:

Options +FollowSymLinks RewriteEngine on

Nowrepparttar 143686 rewrite engine is switched on. You can now start adding as many rewrite rules as you want. The format is simple:

RewriteRule rewrite_from rewrite_to

Here "RewriteRule" is static text, i.e. you should not change. "rewrite_from" isrepparttar 143687 address which will be typed inrepparttar 143688 browser and "rewrite_to" - which pagerepparttar 143689 server will actually activate. Both of these can contain "masks", but in "rewrite_to" we will only use $ and will discuss more or "rewrite_from" part. Let me "meet you" withrepparttar 143690 very few masks you'll need and bring you some samples. You'll see how easy is it.

Let's stop talking theory and see an example. Let's imagine your server runs an e-shop, which uses URLs like index.php?task=categories to listrepparttar 143691 categories, index.php?task=category&id=5 to show a category contents and other parametters in 'task' to do other things.

4 Ways To Get Relevant Adsense Ads On Your Site

Written by Mohd Fairuz

If you're an active Adsense publisher, I'm sure you have seen irrelevant Adsense ads on your site. Right? I've experienced them too.

Not only these ads do not relate to your website content, they will not get clicked as well.

Recently I've figured out several ways how to solve this problem.

1- Try adding META tags to your web page. The most important tags are TITLE, DESCRIPTION and KEYWORDS.

2- Rename your html file. Don't use a generic name. Instead, use your keyword(s) as your file name. For example, ifrepparttar page is about making money with Adsense, simply name it make-money-with-adsense.htm.

Cont'd on page 2 ==> © 2005
Terms of Use