have a magento site i click on all links and they rewrite fine. Only one issue, I have some links that look like this assume my domain name is somesite.com

http://www.somesite.com/?htm/147 and i want it to redirect to http://www.somesite.com/someplace/ of course homesite is replaced with my real domain. assume i am using https://github.com/nexcess/magento/blob/master/.htaccess.sample renamed to .htaccess

i add this to .htaccess but it has no affect

Redirect 301 /?htm/147 http://www.somesite.com/someplace/ ideas?

  • What is "someplace", in this case? Is that a category/product list page? Or is that a custom CMS page? Sep 30 '15 at 1:25
  • Have you enabled rewrites in Magento System Config? Sep 30 '15 at 1:25
  • I'd suggest having custom rewrites setup in Magento admin, not in htaccess. They are much more manageable.
    – Prateek
    Sep 30 '15 at 7:11

In your .htaccess the following should work: Redirect 301 /?htm/147 /someplace

You could also look at using a rewrite match redirectMatch 301 ^/?htm/147/?$ /someplace/

If you're going from someplace.com to someplace.net you would need to setup the following: RewriteEngine on RewriteCond %{HTTP_HOST} ^someplace.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.someplace.com [NC] RewriteRule ^(.*)$ http://someplace.net/$1 [L,R=301,NC]

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.