I have the following code which works great:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)/?$ index.php?mode=$1 [QSA]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ index.php?mode=$1&productContent=$2 [QSA]
My problem is when I go to a page that doesn't exist on my site ie. mysite.com/books I get the following warning error: failed to open stream: No such file or directory. Is there a way to avoid this error and have it go to "404 Page Not Found" instead?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…