• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

htaccess redirect including trail

Hello Experts.

This may be easy! I am stuck on a HTACCESS redirect.
Here is the PHP link that I am trying to redirect.

http://domain.com/subfolder/results.php?a=basic&b=sfr&c=code[]=25911

This htaccess code is working fine at the exception of code[]=25911 I am getting code%255B%255D=25911

RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^results\.php\/?(.*)$ "http://sub.domain.com/folder/subfolder/results.php" [R=301,L]

What am I missing?

0
jccyber
Asked:
jccyber
1 Solution
 
gcitronCommented:
Url is there already processed by web-server and characters considered "illegal" are encoded. If you like the url unchanged, you must use NE or, in more complex rules, extract url from %{THE_REQUEST}. Try to add NE in redirect rule like this: [NE,R=301,L]
0
 
jccyberAuthor Commented:
Thanks! This is perfect
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now