Forum Moderators: phranque

Message Too Old, No Replies

htaccess strip variable

         

ronnyskog

10:05 am on Apr 23, 2010 (gmt 0)

10+ Year Member



I'd like to be able to check any request for "del_entry.php" for the presence of a certain value (&user=__public__)and strip this value if present, vithout stripping other values.

For example...

[example.com...]

should be redirected to

[example.com...]

Is this possible to do with .htaccess? I have been able to find code for stripping all values from a url, but not for stripping one value only.

jdMorgan

12:59 pm on Apr 23, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is the position of "user=__public__" predictable, or can appear anywhere in the query string? Are other leading and/or trailing name/value pairs always present, or can this name/value pair appear alone?

It is possible to do this, but your answer greatly affects the complexity (and efficiency) of the solution.

Jim