Forum Moderators: phranque

Message Too Old, No Replies

.htaccess rewrite static page image tag url to another url

.htaccess rewrite static page image tag url to another url

         

arunkumar

6:05 pm on Sep 25, 2008 (gmt 0)

10+ Year Member



Can any one help me to fix this problem.

I am using joomla 1.5 and sh404shef component in my project.
In my site the images are placed in”images/stores/” folder.

Just imagine the site name is www.site.com

I have a main menu international , if you click the international menu ,the links will be www.site.com/internationa/ I have set the menu link like this by using sh404shef component (Really there is no directory name international in root folder ,

This international menu is pointed to a Article page. In side the article (it’s nothing but a html content ) I have included images eg (<img src =”international/xyz.jpg”>) inside this static content.

By using .htaccess is it possible to rewrite the img tag src url “international/xyz.jpg” to “images/stories/xyz.jpg”

jdMorgan

10:29 pm on Sep 25, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, but why not simply link to <img src ="/images/stories/xyz.jpg”> ?

Jim

arunkumar

5:09 am on Sep 26, 2008 (gmt 0)

10+ Year Member



Thank you very much for your reply :)

Initially our site is a non joomla site. Images needed for the page international have placed inside the directory international. so in the static pages, images are accessed by <img src ="/international/xyz.jpg">

Now we are converting our site to joomla , also we need the same url of the existing site. ie( existing site url "www.exixting.site.com/international/" to joomla site url "www.joomla-site.com/international/ ")

By using the sh404sef component we have converted all the links like the existing site (initial non joomla site)

Now , only the static page image tag urls are differ from the existing site. ie ( non-joomla site image src url '/international/xyz.jpg', joomla site image src url '/images/stories/xyz.jpg')

jdMorgan

3:24 pm on Sep 26, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, then a trivial mod_rewrite rule can easily do this for you. See the links to documentation and tutorials in our Apache Forum Charter [webmasterworld.com], then post your best-effort code and specific question back here.

Thanks,
Jim

arunkumar

10:05 am on Sep 27, 2008 (gmt 0)

10+ Year Member



Thanks :)

I will go through this Apache Forum charter,
If possible can you please let me know the single line code to rewrite the link .