Hugo Pakula
Hugo Pakula

Reputation: 385

Dynamic URL alongside URL rewrite

I am trying to have a URL like the following:

http://example.com/product/category/name?ref=title

Where there is a URL Rewrite AND (at least 1) ?attribute=value at the end of the URL.

How do I get the value of that attribute with the '?' before it? I have tried just using the basic $_GET[''] to get the value, but it doesn't seem to work.

Upvotes: 0

Views: 52

Answers (1)

Mikolaj
Mikolaj

Reputation: 708

Here are a few ideas:

RewriteRule /page /index.php?attr=val [QSA]

You can also use %{QUERY_STRING} variable in the rewrite rule.

Upvotes: 1

Related Questions