htaccess redirect including trail

Posted on 2011-04-20
Last Modified: 2012-05-11
Hello Experts.

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

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

RewriteCond %{HTTP_HOST} ^$ [OR]
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^results\.php\/?(.*)$ "" [R=301,L]

What am I missing?

Question by:jccyber
    LVL 2

    Accepted Solution

    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]

    Author Closing Comment

    Thanks! This is perfect

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now