I am using a redirect match right now. This works but it is getting very cumbersome because there are upwards of 30 different album names that correspond to 1 of the 3 subfolder names.
For example, I have 3 main folders named family, pets and travel. Within each folder there are many subfolders. Currently I have them listed in an either/or fashion. Like this, (folder1|folder2|folder3).
My question with over a 100 subfolders (between the 3 main folders) is there an easier way to accomplish this? By the way, the many subfolders follow no pattern to separate them through pattern matching.
Here is an example:
- Code: Select all
#####Checking For Travel Albums and Redirecting
RedirectMatch 301 /picalbum/?(albums)?/(hainesville2008|/CR2008|costa+rica/fincalunanueva|flaselva|huntsvillescarecrow|huntsvillegardens|CRchildrenmuseum|seaportvillage|monticellonaturalization|ivycreek|uvahomes|morven|SantaAnaCA|santarosa|oldtowntemecula|anzaborrego|balboapark|capistrano|ENC-CA)/?((([aA-zZ_]+[0-9]+)|P(A|B)?([0-9]*)|IMG_([0-9]*)(.*)|([0-9_]+)([aA-zZ_]+)|([aA-zZ_0-9]+))?\.?(highlight.)?(jpg)?)?$ http://www.anydomain.com/picalbum/travel/$1/$2
This works fine until someone just wants /gallery/crla/
In other words, don't want to look at a specific image but instead want to look at the overall page for the album.
So, I have 2 questions:
1. Is there an easier way than listing all the subfolders individually for each main folder?
2. How can I get it to work for just a request like /picalbum/crla/ ?
Thanks,
Randal