I want to make it so when people go to /index.php?page=about.xhtml they are redirected to /about/ I understand that I can either do this using .htaccess or by using php. I am replacing the old site with a wordpress installation, so it will have a new index.php file. I could integrate the php commands to get the page variable and then send headers into the new index.php, or as I said above, I could use .htaccess. From my limited udnerstanding of .htaccess it seems you have to do something special to get the variable out. There are only 5 urls that I want to rewrite, so it doesn't need to use regular expressions or anything (I don't yet understand regular expressions either :)) If someone is linked to/has bookmarked /index.php, I want them to be redirected to / (that's easy enough) If someone is linked to/has bookmarked /index.php?page=forms.xhtml, I want them to be redirected to / If someone is linked to/has bookmarked /index.php?page=programme.xhtml, I want them to be redirected to /programme/ If someone is linked to/has bookmarked /index.php?page=about.xhtml, I want them to be redirected to /about/ If someone is linked to/has bookmarked /index.php?page=links.xhtml, I want them to be redirected to /links/ Old index.php file <?php
include('header.xhtml');
if(!empty($_GET['page'])) { include($_GET['page']); }
else { include('main.php');include('counter.php'); }
include('footer.xhtml');
?> new Wordpress index.php file <?php
/* Short and sweet */
define('WP_USE_THEMES', true);
require('./wordpres/wp-blog-header.php');
?> It would be kind of cool if I could integrate some kind of logging system to count the number of redirected hits so I can see that all this was only for the 3 people who actually bookmarked pages, but that's not really important. Thanks very much!