Jump to content

mikejv

New Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by mikejv

  1. Hi all,

    This is a strange one that's really bugging me. I have some very simple HTACCESS code:
     

    RewriteEngine On
    RewriteRule ^(.*?)/?$ index.php?folder=$1


    So, visiting mysite.com/admin should point to mysite.com/index.php?folder=admin

    However, when using print_r( $_GET ) on index.php, I get:
     

    Array ( [folder] => index.php )


    I'm getting index.php returned instead of admin, any ideas?

    Thanks!
     

  2. Hi all,

    I hope I explain this well enough - my apologies for any confusion.

    My website uses a pretty basic "page and ID" system, and uses the following RewriteRule

    RewriteRule ^(.*?)/(.*?)/?$ view.php?page=$1&id=$2

    So mysite.com/story/33 is actually pointing at mysite.com/view.php?page=story&id=33

    The issue is, sometimes a page will have an extra query string; example mysite.com/story/33?code=123456

    I can't seem to access "code" in view.php (print_r( $_GET ) only gives me "page" and "id"), and I don't know how to write a RewriteRule to put "code" in view.php?page=$1&id=$2&code=$3?

    Any help would be appreciated - thanks!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.