Code: [Select]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^.* list.php
Now this is the code which is using the keyword “How-I-Met-Your-Mother” in the url http://www.dontwatchvideo.com/How-I-Met-Your-Mother/ to show the relevant videos based on the keyword. It is being done by sending the keyword “How-I-Met-Your-Mother” to a .php page (using $_Get) on my site to process the videos for this keyword.
The problem you’re having is in not specifying the acceptable characters with your regex (you’re using what is known as “lazy regex” which I rail on about constantly). PLEASE learn some real regex (start with the tutorial linked in my signature if you have no other place to go) as there are MANY forms your regex CAN take to satisfy your requirement.
Shaggy,
Sorry but your code makes no sense to me. It says, USING APACHE 1.x (really?), start with one or more digits, lowercase letters and hyphens followed by an optional / followed by ANYTHING and redirect the pre-/ nonsense as the KEY in a valueless query string assigned to list.php. Does that make any sense to you?
Why would I have suggested it if it didn’t make sense?
I have used this type of setup numerous times (although admittedly passing the URL in via a variable instead of as a generic query string parameter) but both can and do work via PHP.
No definition from you about what you think your code is saying?
My posts (and the sticky threads and the tutorial linked in my signature) are full of comments re the difference between Apache 1.x and Apache 2.x (and the impact on the start anchor use). If you don’t know the difference, use ^/? as both will accept that.