Link to home
Start Free TrialLog in
Avatar of cxs410
cxs410

asked on

301 Redirect

I have a situation where a group of links changed because part of the link changed:

Old: http://www.domain.com/products/Cisco/Access-Servers/AS53x0-Series

New: http://www.domain.com/products/Cisco/Access-Servers/AS5300-Series

How can I make a 301 redirecto fix the links...
Avatar of sompol_kiatkamolchai
sompol_kiatkamolchai
Flag of Thailand image

Hi cxs410,

Try to add this in httpd.conf or .htaccess

RedirectMatch 301 /products/Cisco/Access-Servers/AS53[1-9]0-Series /products/Cisco/Access-Servers/AS5300-Series

Hope this help,
Sompol
Avatar of cxs410
cxs410

ASKER

That does not appear to work.. (I added it to the .htaccess
Try to add it to httpd.conf
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^products/Cisco/Access-Servers/AS53x0-Series(.*)$ http://www.yourdomain.com/products/Cisco/Access-Servers/AS53x0-Series$1 [L,R=301]
</IfModule>
muahh... today is not my day, correct code below
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^products/Cisco/Access-Servers/AS53x0-Series(.*)$ http://www.yourdomain.com/products/Cisco/Access-Servers/AS5300-Series$1 [L,R=301]
</IfModule>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Linux Guru
Linux Guru
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial