0

I'm using a Zend Framework based site (version 1).

I would like to redirect users/clickers to my actual url https://www.example.com/133-8/anay-bose as they click on the example.com/anay-bose. In other words, mysite.com/anay-bose should redirect to https://www.example.com/133-8/anay-bose.

What would be the most easy and effective solution. Can I redirect via .htaccess? or Zend Redirect? Don't have much regex expertise so a hint or two might help.

1 Answer 1

1

You can do it with .htaccess like this:

RewriteRule ^133-8/anay-bose https://www.example.com/133-8/anay-bose [R=301,L]

Or in a controller, if you want to send the user there, do this:

<?php
$this->_redirect('https://www.example.com/133-8/anay-bose', ['exit'=>true]);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.