Having trouble with Apache Redirect 301 from domain to sub
I am using Apache2 and am trying to get a 301 Redirect of eight specific links to its new site. The new site is on its own server. The current url is, e.g.,
What do I need to do to successfully get these redirects to work? I don't want to use the htaccess file unless necessary, I hear it is better to do this in a separate vhost???
Thanks!
Here is a sample of the redirects I created:
Redirect 301 /products/type http://sub.example.com/products/
Redirect 301 /products/type/widgetsandaddons/2/ http://sub.example.com/products/2
Redirect 301 /products/type/widgetsandaddons/3/ http://sub.example.com/products/3
Redirect 301 /products/type/widgetsandaddons/4/ http://sub.example.com/products/4
5 Replies
docs
If you put the new configuration in a .htaccess file, no reload is necessary, but if you put these directly in a vhost config file, you need to reload the config with /etc/init.d/apache2 reload.
ProxyPass /products/type
ProxyPassReverse /products/type