The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

PHP or mod_rewrite?

B

BlueBoden

Guest
I would recommend that you use mod_rewrite, its actually very easy to enable such, not always important though.

Code:
RewriteEngine on
RewriteRule ^Articles/([0-9]+)/$ /?AID=$1

The parentheses simply creates a back-reference, or "remembers" the match, the "+" allows at least 1 digit to be present. The /?AID=$1 part is the real URL relative to the root. See also: Absolute and Relative Paths


The URL should of cause be unique, so it would be best either simply to use a number like in above example, or to include the exact date as part of the URL, or as a sub-directory.

Note, its not really that important to have "readable" URLs, only very few users actually use them. And it raises a number of issues since the URLs still need to be unique, which can't always be assumed.
 
Last edited:
I agree that mod_rewrite would be easier. You just need to make sure that when you 'generate' hyperlinks, they are generated in 'pretty url' mode :)
 
MI
Back