How to rewrite mod from old folder to new folder

I made a large change to one of the folders of my site. Changed to . How do I rewrite mod(apache) to 301 redirect everything from places to unied states for all files and urls in that folder?

Have you checked this out yet?

1 Like

That tells me everything except what I want to do. It doesn’t tell me how to redirect one directory to another. It tells me how to change specific URLS and what to do if I moved the resources to another server.

Maybe try this option from the recommended link:

A particular resource might exist in one of several places, and we want to look in those places for the resource when it is requested. Perhaps we’ve recently rearranged our directory structure, dividing content into several locations.

The following ruleset searches in two directories to find the resource, and, if not finding it in either place, will attempt to just serve it out of the location requested.

I found the answer elsewhere:

RewriteRule ^places/(.*)$ /united-states/$1 [R=301,NC,L]

Does the trick


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.