Redirect from a file to a directory
This .htaccess file is placed within the old directory where the file is located.
Redirect 301 page.html "https://www.udel.edu/dir/"
Redirect an old directory to a new directory
This redirects an old directory (/old_dir) to a new directory (/new_dir). This .htaccess file is placed within the old directory.
Redirect 301 /old_dir "/new_dir"
Redirect a file to another file in another directory
This redirects a file (index.html) to a new file in a new directory (/mydir/index.html). This .htaccess file is placed within the old directory.
Redirect 301 /index.html "/mydir/index.html"
RewriteEngine directives restrictions and security
Due to security risks +FollowSymLinks is disabled on Copland. This also prevents the use of the RewriteEngine directive. Use the redirect techniques above to get around this.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^old_dir/(.*)$ /new_dir/$1 [R=301,NC,L]