I had to adjust some paths on my site and I need to use .htaccess to redirect the items on the chance a user accesses the old url.
For example my old urls (relative) could be:
/old-path/page1.php
/old-path/page2.php
/old-path/page3.php
etc...
I had to change the path (for this example) to new-path and I need to adjust the .htaccess so anyone that comes to any page with …/old-path/… will be redirected to
.../new-path/...
Also, would this satisfy the 301 or would I need to list out each page?
You can use either mod+alias:
or using mod_rewrite:
These could be in the htaccess file in your document root or in the server/vhost config. If you already have rewrite rules somewhere, you may just want to stick with mod_rewrite because redirecting with mod_alias while using mod_rewrite can sometimes give conflicting results.