Forum Moderators: phranque
The longer answer is depending on the application, sometimes there is a work-around, but generally, it is faster/earier to use a script before the URL is requested to do the replacing.
If you would post an example, we might be able to give you some advice.
Hope this helps.
Justin
However, I was curious, as if possible with just mod_rewrite, it would be a more simple and elegant solution than mod_rewrite + a script where needed.
A short example of where I use it is the following:
urls like mysite/some_item_name should be changed to mysite/some-item-name
You might try a search on your favorite engine for:
replacing underscores in URL site:webmasterworld.com
I would post them for you, but they are probably 5 to 10 pages back and I don't remember exactly where they are.
Justin
That's not really what I'm after, because it would take a large number of rules just to perform that, and also the number of rules I would need is unknown.
If that's the only known solution in mod_rewrite, I think I'll just stick to the script for that part of the url mod ;)