Need .htaccess Rewrite Rule To Remove Trailing <br%20/>
1
vote
0
answers
324
views
I have links that for some reason have a trailing
from CMS Page Endings -
and I don't know where they are coming from to try and fix them. So I need a general rewrite rule to remove them so the links won't show up as 404's.
I am using amazon-linux-ami/2014.09 and my Apache is Apache/2.2.29 (Amazon).
This is the original link: abc.com/pages.php?pageid=265
Here is what I have tried:
### Strip from CMS Page Endings -
/pages.php?pageid=265
RewriteRule ^/pages\.php\?pageid=([0-9]+)(
)?$ /pages.php?pageid=$1? [R=301,L]
When this rule is used I get this instead.
abc.com/pages.php?pageid=265
What I want is abc.com/pages.php?pageid=265
with the option for the pageid
to be any number.
Since I don't have the reputation I removed the http://www
.
Asked by sharingsunshine
(11 rep)
Oct 29, 2014, 08:29 PM
Last activity: Feb 17, 2017, 11:09 AM
Last activity: Feb 17, 2017, 11:09 AM