Solved

htaccess appending old url

Posted on 2014-11-10
2
216 Views
Last Modified: 2014-11-13
Old URL is appending with this 301 redirect access code - anyone have any suggestions? Here is what the URL looks like http://www.website.com/client/iconic/company-overview?p1=about-iconic

<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME}  !-d
RewriteCond %{REQUEST_FILENAME}  !-f

#added %253F for '?' in page name url
RewriteRule ^securities/?([0-9a-zA-Z%253F-]+)?/?$ index.php?p1=$1 [QSA,L]
RewriteRule ^([0-9a-zA-Z%253F-]+)?/?$ index.php?p1=$1 [QSA,L]
</IfModule>

Redirect 301 /client/iconic/about-iconic http://www.website.com/client/iconic/company-overview
Redirect 301 /client/iconic/portfolio http://www.website.com/client/iconic/portfolio-overview
Redirect 301 /client/iconic/investor-relations http://www.website.com/client/iconic/investor--overview-%257E-test

Open in new window

0
Comment
Question by:Lanmarkian
2 Comments
 

Author Comment

by:Lanmarkian
Comment Utility
The URL is appending "?p1=about-iconic" - An example is: http://www.website.com/client/iconic/company-overview?p1=about-iconic

We need it to say http://www.website.com/client/iconic/company-overview

Any help or guidance is appreciated.

Thanks in advance.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
Comment Utility
The first two RewriteRules are the culprit.  They fire first and rewrite the url.  The Redirect 301 statements below that never trigger.

Move the Redirects above the Rewrites.
0

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

Join & Write a Comment

Suggested Solutions

Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now