toasti,
Actually, the code (in the clubs subdirectory) should be
Code:
RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)$ club.php?id=$1 [L]
to redirect www.38.co.za/clubs/olde65 to your script at www.38.co.za/clubs/club.php?id=olde65. The difference is the "^" which stipulates that the {REQUEST_URI} string must "start with..." and the "$" specifies that it must be the "end of string."
The other way (without the "^"), mod_rewrite should look for and skip the last non-conforming character (".") in the {REQUEST_URI} string (clubs.php) and return "php".
It's beginning to sound like you want mod_rewrite to change the links in your pages to give you the new format URLs -- it doesn't do that. What we're doing is allowing you to utilize "human-friendly" URLs and convert them within Apache for your scripts to use.
Goofy,
The same applies to you as you want to change the URL http://www.goofyhumor.com/ggcartoons2/1 to ??? If you want a webroot index.php file to serve the cartoon defined by cat=ggcartoons2 and id=1, then
Code:
RewriteEngine On
RewriteRule ^([a-z0-9]+)/([0-9]+)$ index.php?cat=$1&id=$2 [L]
will look for one or more lowercase and digits followed by a slash followed by one or more digits and redirect that to the index script with the query string attached. YOU must:
1. create the links in the new format AND
2. ensure that links within the script are preserved as ABSOLUTE OR use the HTML BASE tag to identify the actual location of the script.
Regards,
DK
Bookmarks