Forum Moderators: phranque

Message Too Old, No Replies

replace the dot in url

replace dot

         

brajno

2:08 am on Nov 28, 2009 (gmt 0)

10+ Year Member



Hi,

I had a joomla! 1.0 site with lots of articles with dots in the url. Now I upgraded to 1.5. Now I need to replace the . (dot) in the url. For example if a user writes:

www.example.com/lorem.ipsum.html
I need to redirect him to
www.example.com/lorem-ipsum.html

and if there is a certain word like

www.example.com/word-lorem.-ipsum.html
to
www.example.com/word-lorem-ipsum.html

I am new to .htaccess and hope someone can help.
Thanks

jdMorgan

3:55 pm on Nov 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have many URLs with periods in them, then the best solution is to call a script to do this, because .htaccess is terribly inefficient at general character substitution. And if multiple periods can appear in the URLs, then that can make things orders of magnitude worse.

So before heading down the .htaccess road, be very sure that there is not already a 'plug-in' you could get to do this for you.

Jim

brajno

11:37 am on Dec 2, 2009 (gmt 0)

10+ Year Member



Thank you!