X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Edit help.php Section (https://forum.x-cart.com/showthread.php?t=68262)

MAPerformance Admin 12-04-2013 03:22 PM

Edit help.php Section
 
We have an old URL, http://www.maperformance.com/help.php?section=about#services, that we don't use any longer. The thing is, I can't even figure out what the content of that page is supposed to be. What I'm trying to do is redirect that URL to a new location, but even putting a standard 301 redirect in our .htaccess file doesn't work. How can I redirect this URL?

cflsystems 12-04-2013 09:20 PM

Re: Edit help.php Section
 
this url has query string, you can't use standard 301 redirect. You have to use RewriteCond and RewriteRule to redirect it

MAPerformance Admin 12-05-2013 07:32 AM

Re: Edit help.php Section
 
Thanks Steve for the direction!

For the record, this is how I did it (in .htaccess):

# Redirect old About Us-Services URL
RewriteCond %{REQUEST_URI} ^/help.php$
RewriteCond %{QUERY_STRING} ^section=about$
RewriteRule ^(.*)$ http://services.maperformance.com [R=301,L]

Unfortunately I couldn't include the hash on the original URL, since that is used for commenting in .htaccess.

cherie 12-12-2013 04:25 PM

Re: Edit help.php Section
 
This is probably how I would have done it:
Code:

RewriteCond %{QUERY_STRING} section=about
RewriteRule ^help.php$ http://services.maperformance.com/? [R=301,L]

Assuming you don't want to include the query string in the redirect.


All times are GMT -8. The time now is 06:34 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.