Hi there!
I did some extensive searching on the forums here and was unable to find what I'm looking for. I'm hoping someone can point me in the right direction here. What I'm trying to accomplish I thought was pretty simple however it's proving to be a bit tougher than originally thought.
What I'm trying to do is simply replace certain characters in the QUERY_STRING with a RewriteRule and then redirect to this filtered url.
The behavior of this code does what I want it to do, however it does not include the QUERY_STRING which is what I need.
Currently this rewrite rule will change:
What I need to do is:
I believe what I need to do is something like....
...however the proper syntax to accomplish this is escaping me. (is it even possible?)
My only option here is to use lsws rewrite or a .htaccess file. As much as I'd love to just do this in code which would be SO much easier, the code is written by a 3rd party developer and I do not have the ability to alter it due to our contract with them.
Does anyone have any suggestions?
Thanks in advance for any help on this.
I did some extensive searching on the forums here and was unable to find what I'm looking for. I'm hoping someone can point me in the right direction here. What I'm trying to accomplish I thought was pretty simple however it's proving to be a bit tougher than originally thought.
What I'm trying to do is simply replace certain characters in the QUERY_STRING with a RewriteRule and then redirect to this filtered url.
The behavior of this code does what I want it to do, however it does not include the QUERY_STRING which is what I need.
Code:
RewriteRule ^(.*)-(.*)$ /$1_$2 [N]
- this-file-test.php -> this_file_test.php
What I need to do is:
- this-file-test.php?t=this-is-a-test -> this-file-test.php?t=this_is_a_test
I believe what I need to do is something like....
Code:
RewriteCond %{QUERY_STRING} ^/(.*)-(.*)$
RewriteRule ^(.*)$ /%1_%2 [N]
My only option here is to use lsws rewrite or a .htaccess file. As much as I'd love to just do this in code which would be SO much easier, the code is written by a 3rd party developer and I do not have the ability to alter it due to our contract with them.
Does anyone have any suggestions?
Thanks in advance for any help on this.
Last edited by a moderator: