unemployment — 2012-08-13T09:58:22-04:00 — #1
I'm working on a new travel application and I ran into a php issue. I was trying to make my page have ajax bookmarkable links by using the #hashtag. I was going to manipulate the page based on what hashtag was generated on page load, but PHP can't parse the hash tag. Unfortunately, referencing my pages like http://mysite/trips#/home is out! I now decided that I'd like to reference my pages as http://mysite/trips/home but I have no idea how to do it since I don't have a trips directory, nor do I have sub pages? All I have is a trips.php file in my root directory. I know I can change the links in the HTML easily to the newly rewritten URL, but how do I make the pages exist using a rewrite rule? Any suggestions?
righteous_ninja — 2012-08-13T21:20:17-04:00 — #2
Rewrite the request to call trips.php with a name value pair.
RewriteRule ^trips/(.*) trips.php?tag=$1