Jump to content

[SOLVED] mod_rewrite and standard $_GET variables?


Buddyb3ar

Recommended Posts

I'm not very experienced with mod_rewrite or the rewrite engine, but I know enough to get me by.

 

Recently though, I've ran into a problem. I need to use standard $_GET variables, but still be able to use mod_rewrite to rewrite the URL.

So, I basically want a URL that looks like this:

 

www.mysite.net/register/?error=1

 

I'm not really sure how to do this, but I know there is a way (I've seen other sites do this correctly). Does anyone have any idea how to solve my problem?

Link to comment
Share on other sites

if it were me I would format it like so:

 

www.mysite.net/register/get/error/1

 

Than use regex in either php or the htaccess file, if it contains get don't redirect to that but the item before it. Than you can use the page to parse the URI and anything after get should be formed of varname/value

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.