Forum Moderators: phranque
Sorry to bring this one to you for my first posting :-(
Have been pulling my hair out on this one - so here goes:
Ok so recently someone has sent me about 200+ photos of a
recent charity event we held. The photos & loads of html
pages don't follow the normal naming convention in that
they have spaces within the names.
Some examples:
jon & lisa IMG_740.jpg
jon & lisa & dave IMG_741.jpg
also
jon & lisa & dave IMG_741_jpg.htm
etc etc
They are contained within a directory /charity/
This issue is with %20 that is used instead of the space
as the photos & pages can't be found at the moment.
How would I use redirectmatch in .htaccess so that I am
able to link to the images and files correctly for this
directory only?
Have tried Googling it but don't seem to be able to get it
right.
Many thanks in advance for any assistance you can offer.
Thanks
Steve
We've discussed code for replacing various characters (such as underscores and spaces) with hyphens many times before, so I commend the "site search" link at the top of this page to you.
Take a look at the resulting threads, modify the code to suit, and post if you have any difficulties.
Jim
Perhaps a two-letter prefix followed by a numerical sequence of "0001 thru 0200".
The logic for this is that in the event the SE's index your images with names in the file-names?
Your going to get unwanted visitors searching your site for
"jon, lisa or dave" (your examples).
The benefits to the prefix-numerical names is that paths will be much easier.
Of course you'll need to create an offline index with old names and new prefix-numbers.