Hello, First off I wanna apologize for my ignorance but mod_rewrite and regex seems just a bit complicated for me and I need this done fairly quickly. Basically what I'm trying to accomplish is the followings:
Get rid of the
.php
extensions and get rid of the index.php - Basically when a user enters http://www.example.com/index.html to be redirected to http://www.example.com/ if he or she enters anything else than.html
to get a 404 page not found.I'm using IDs to grab the title from the DB. I would like to rewrite /?id=1 (each number corresponds to a title in the DB) to /title_name.html.
If a user types in /unknown_title (the title is not found in the DB) or …?bleh=hey (or any other similar nonsense) to redirect him or her to 404.html.
I managed to make one of the three work but I don't know how to redirect the user any of the wanted cases. If anyone could help with this I would really appreciate it! Thanks a lot in advance.