Hi, I am trying to make my dynamic URL's search engine friendly, I have added the .htacces file with the following which I found on this site, Thank you for the help with that
[/text]
Code: Select all
RewriteEngine On
RewriteRule index/(.*)/(.*) index.php?$1=$2
which does work nicely with the following PHP code in my index.php
[/text]
Code: Select all
<ul class="menu">
<a href="index/page/home">Home</a> <img src="images/present.png" height="38" width="35" alt="logo"/>
<a href="index/page/hints">Hints & Tips</a> <img src="images/present.png"height="38" width="35" alt="logo"/>
<a href="index/page/occasions">Occasions</a> <img src="images/present.png" height="38" width="35"alt="logo"/>
<a href="index/page/blog">Blog</a> <img src="images/present.png" height="38" width="35"alt="logo"/>
<a href="index/page/about">About</a>
</ul>
<br>
<?php
$page = $_GET['page'];
switch($page)
{
case('home'):
include ("home.php");
break;
case('about'):
include ("about.php");
break;
case('occasions'):
include ("occasions.php");
break;
case('blog'):
include ("blog.php");
break;
case('hints'):
include ("hints.php");
break;
}
?>
My issue is the URL keeps growing, so after a few clicks on the menu items i end up with index/page/index/page/index/page/index/page/occasions. Additionally it seems to kill the formatting I have created in my style.css file.
Any help or suggestions would be much appreciated
[/text]