I'm trying to get the data after the URL and sent back to the home page. I have had errors in the .htaccess file on one server so I am trying it out on another server.
The links down the side of http://www.newbiemoneymakers.com/bank/
should do directly to http://www.newbiemoneymakers.com/bank/index.php
where I then get the title.
My .htaccess file says:
RewriteEngine on
RewriteRule ^http://www.newbiemoneymakers.com/bank/([^/\.]+)/?$ index.php?title=$1 [L]
My index page says:
<?php
include('includes/functions.php');
$activeTab = "navhome";
$sent = false;
$title = (isset($_GET['title']))? mysql_real_escape_string($_GET['title']) : 'Home';
$title = str_replace('-',' ', $title);
if($title != '') {
$sql = "SELECT *
FROM contents
WHERE name LIKE '%$title%'
LIMIT 1";
$result = @mysql_query($sql);
$row = mysql_fetch_assoc($result);
}
//Set page title
$pagetitle = (isset($row['name']) && $title != 'Home')? ucwords($row['name']) : "Bank Charges";
?>
But when I click on any of the links (e.g. http://www.newbiemoneymakers.com/bank/bank-charges-refund/
) it gives me a 404 page!
Do you know where I am going wrong?
Ian