Jump to content

Replace multiple directories with one virtual directory


Merdok

Recommended Posts

ok thanks to the help I've had on this forum and Google I've got pretty much everything rewritten on my site now, there is just one more thing that is causing me an issue.

 

I want it so my various modules image directories are hidden and instead point to a virtual directory in the root.

 

eg: if someone types in /articleimages/imagename.jpg  it will point to  /admin/module/module/images/imagename.jpg

 

I've tried to figure it out myself but it is not working at all. Here is my effort:

RewriteRule ^articleimages/?$ /admin/modules/module/images/$1

 

but when I test it, nothing happens. Could someone please tell me what I'm missing?

Right that definately works when called via http but I have a bit of a problem, I use phpThumb to read some images in and if I set the image url to /articleimages/imagename.jpg then I get:

 

/home/sites/digitalfusiondev.me/public_html/articleimages/imagename.jpg does not exist

 

I'm not sure if there is something that can be fixed using mod_rewrite or something that needs changing in phpThumb.

 

Any ideas?

as its reading from the server path a rewrite won't apply,

maybe use a symbolic link instead

//1. remove the articleimages folder
symlink('/admin/modules/module/images', 'path-containing-articleimages/articleimages');

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.