I am updating a site of mine and would like to redirect a fair few subdomain URL's to subfolders.
Here's an example of whats currently setup.
galleries.example.com/name-of-gallery/randomnumbers
galleries.example.com/another-gallery-name/randomnumbers
I would like to forward them to
example.com/gallery/name-of-gallery
example.com/gallery/another-gallery-name
The folders are going to be setup with the correct names. The problem is, how to do this via .htaccess redirects without writing each one out individually.
The random numbers at the end of the subdomain URL's are probably going to cause a pain but there's nothing I can do about them.
I could write them all out, but that would make for a very large .htaccess file - unless that's the only way to do this?