Solved

htaccess appending old url

Posted on 2014-11-10
2
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:Lanmarkian
ID: 40434825
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
ID: 40435304
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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

717 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