2👍
✅
This should go into your main urls.py
file and should be first entry so that this url pattern is applied first:
from django.views.generic import RedirectView
urlpatterns = patterns('',
(r'^/portfolio/[^$]*$', RedirectView.as_view(url='/product/')),
)
The regex pattern r'^/portfolio/[^$]*$'
means that any URL starting with /portfolio/
and there can be anything after that till end.
Source:stackexchange.com