i'm creating a drupal site that should include a feature that will turn a clean url into a a url with a query string.
The way it should work would be:
- user would type any clean url like www.example.com/hobbies/skiing in the url bar.
- here is my problem:
inside the .htaccess i've put this line of code:
RewriteRule ^hobbies/([a-zA-Z0-9-]*) /index.php?hobbies=$1 [NC]
in the drupal, i've created a page with PHP Filter enabled, then typed in
<?PHP echo $_GET['hobbies']; ?>
the RewriteRule should turn www.example.com/hobbies/skiing
into www.example.com/index.php?hobbies=skiing
but i guess the code doesn't work as expected, or drupal has codes running that either skips the .htaccess command or something.
3.once the url has been translated into a dirty url, the page will display what the value of hobbies is, as the code works when you actually type www.example.com/index.php?hobbies=skiing directly into the url bar.
can you help me with this one?