Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Edit help.php Section

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-04-2013, 03:22 PM
 
MAPerformance Admin MAPerformance Admin is offline
 

Advanced Member
  
Join Date: Jun 2013
Posts: 44
 

Default 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?
__________________
X-cart 4.4.3 Gold
Modern Automotive Performance
Reply With Quote
  #2  
Old 12-04-2013, 09:20 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
qualiteam (12-05-2013)
  #3  
Old 12-05-2013, 07:32 AM
 
MAPerformance Admin MAPerformance Admin is offline
 

Advanced Member
  
Join Date: Jun 2013
Posts: 44
 

Default 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.
__________________
X-cart 4.4.3 Gold
Modern Automotive Performance
Reply With Quote

The following user thanks MAPerformance Admin for this useful post:
qualiteam (12-05-2013)
  #4  
Old 12-12-2013, 04:25 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default 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.
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:38 PM.

   

 
X-Cart forums © 2001-2020