Hi Everyone.
I'm looking to use Mod ReWrite to generate URL Friendly paths/links on more than one file. for example.
File 1). Index.php
my main page displays listings of games.. 25 per page. Using a combination of the following i can manipulate the output of the results
http://www.yourdomain.com/index.php?page=1
http://www.yourdomain.com/index.php?cat=mmorpg
http://www.yourdomain.com/index.php?cat=mmorpg&page=1
If the "cat" value is not provided then the script will load all the listings regardless of category, but if the value is provided then it will filter them. In regards to the "page" value if no value is provided then the value defalts to "1" for page 1.
So its important when using the Mod Rewrite that both varibles dont need to be provided.
What i want as an output is
http://www.yourdomain.com/1.php
http://www.yourdomain.com/mmorpg/
http://www.yourdomain.com/mmorpg/1.php
What i am using for this to work is
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.+)/$ index.php?category=$1
RewriteRule ^(.+)/([0-9]+).php$ index.php?category=$1&page=$2
RewriteRule ^([0-9]+).php$ index.php?page=$1
However this seems to conflict when i want to use a true path that actually exisits for example
http://www.yourdomain/admin
instead i have to make sure i actually use the following, or it thinks "admin" is another possible category.
http://www.yourdomain.com/admin/index.php
File 2). details.php
this file is used to display more information on each listing, by using the following
http://www.yourdomain.com/details.php?id=1234
what i would like instead is something like
http://www.yourdomain.com/details-1234.php
Any help on this would be very greatfull.