mod_rewrite RewriteMap - possible to send 404?
In my strenuous efforts to get SEO-friendly urls, I'm using a rewrite map in my apache setup:
Code:
RewriteEngine on Code:
http://mydomain.com/r.php?id=1234 Code:
http://mydomain.com/amazing-and-useful-url/1234 1) If an id is not found in my database, can I send a 404 signal from my map program? If so, how? 2) What's the story with RewriteLock. The documentation is rather tightlipped about the need for it. Am I to understand that if I use a PHP script (or any other program) as a rewrite map that I need a RewriteLock file? What are the required permissions on this file? Can I assume that apache needs to read/write it and will maintain anything it might contain? 3) I'm getting quite concerned about a lengthy list of RewriteCond and RewriteRule items in this particular apache conf file. Is there any way to have apache skip the remainder of rules in this conf file if one fails? 4) is PHP ill-suited to this obviously mission-critical and performance-critical mission? Should I bother writing a C or C++ program? |
All times are GMT -5. The time now is 08:19 PM. |