0 Replies Latest reply on May 8, 2008 1:04 PM by (phil_amoh)

    Friendly Urls- Includes

      My pages using includes typically end with urls like this: <br /> <br />http://localhost/new_site/album.php?id_album=6&amp;go=show_album <br />http://localhost/new_site/album.php?id_album=6&amp;go=picture_detail&amp;id_image=21 <br /> <br />I would want to convert the URLS to something typically like this: <br /> <br />http://localhost/new_site/photos/6.html?go=show_album <br /> <br />I created a .htaccess file with the following statements in it: <br /> <br />RewriteEngine on <br />RewriteRule ^/photos/([0-9]+)\.html /album.php?id_alb=$1&amp;%{QUERY_STRING} <br /> <br />And in album.php, i have <br /><?php<br /><br />$id_album = $_GET['id_album'];<br />$id_image = $_GET['id_image'];<br />$go = isset($_GET['show_album']);<br />$go = isset($_GET['picture_detail']);<br />?> <br /> <br />But the links seems not to work. <br />What am I doing wrong? I'm doing this because when some people come to the site and see that we are using includes they always want to put in their code/ files to see whether they can hack the site. <br /> <br />This is not from a security standpoint, but the reason is we have a 404 page set up that mails not found messages everytime there is a file not found and getting messages because of this is annoying. <br /> <br />If anyone has better ways of doing this *in a fast to deploy way* that doesn't require fiddling with too much of the files on the site, that would also be welcome.