February 14th, 2012, 03:47 AM
Rewrite images path
i am moving to a different hosting. the hosting has a temporary URL like /~username/. All my database links to images are from the root folder. Is there a way in htaccess to tell the browser to read all paths like /images/image.gif to /~username/images/image.gif?
I tried this, but it didn't work.
I also tried
RewriteRule ^/images/([^/]*\.(gif|png|jpg))$ /~username/images/$1
February 19th, 2012, 08:29 AM
Didn't get an answer. Was wondering if someone can help me out with this?
Originally Posted by ashabi
February 19th, 2012, 04:10 PM
The first thing to try is removing the slash from the beginning of the new path:
If that doesn't work, you may need to find the complete file system path for that directory.
RewriteRule ^/images/([^/]*\.(gif|png|jpg))$ ~username/images/$1