I tried:
//301 Redirect Old File
Redirect 301 www.mydomain.com/subdirectory http://newurl.com
but that lands me at newurl.com/subdirectory, which doesn't exist.
Enable mod_rewrite and .htaccess then add this code in your .htaccess under DOCUMENT_ROOT:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com$ [NC]
RewriteRule ^subdirectory/?$ http://newurl.com [L,R=301,NC]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With