Solved

htaccess appending old url

Posted on 2014-11-10
2
220 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

861 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

29 Experts available now in Live!

Get 1:1 Help Now