Hello, I want to redirect a URL to another URL. I am inserting this code into the .htaccess file. Redirect / "http://newdomain.com/" Code (markup): The issue is that the old URL is in a particular folder, and the new domain on the root. For example, I am trying to redirect http://www.olddomain.com/shop/ to http://www.newdomain.com/ Using that code redirects me to http://www.newdomain.com/shop/ How can I redirect it to the root URL ? Thanks in advance.
In .htaccess try: RewriteEngine On RewriteRule ^shop/(.*)?$ http://newdomain.com/$1 [R=301] Code (markup):