Jump to content

[SOLVED] Having troubles...


SharkBait

Recommended Posts

Hi,

 

I want to be able to have a URL like this: www.myurl.com/?m=show&id=3

which normally points to index.php redirect to index2.php.

 

This is what I have but I think the first ? is messing up the rule:

 

RewriteRule ^?m=show&id=([0-9]+)$ index2.php?m=show&id=$1

 

What can I do do correct it? I tried escaping the ? by using \? but that didn't work.

Link to comment
https://forums.phpfreaks.com/topic/73352-solved-having-troubles/
Share on other sites

Ah what I was looking for was to keep the query string intac as i passed it to another page.

 

RewriteCond ^{QUERY_STRING} ^m=show&id=([0-9]+)$
RewriteRule ^ index2.php

 

All works now :)

 

It is because of the question mark that I want to keep it will see it as a URL query.

Archived

This topic is now archived and is closed to further replies.

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