Jump to content

[SOLVED] Should i be worried


npsari

Recommended Posts

Hi guys

 

I have my images in a folder called h-images

 

i.e. www.mysite.com/h-images/

 

I link to my images simply by <IMG src="/h-images/1.gif" border="0">

 

I have 100 webpages, and increasing

 

I am worried that one day, whoever is in change! might decide that folders can not contain -

 

So, i will have to change my whole pages because of that

 

is this possible that one day in the future, folders must not contain -

Link to comment
https://forums.phpfreaks.com/topic/75831-solved-should-i-be-worried/
Share on other sites

What you could do is just set up a global system that tells you where your folder points.

 

You can use .htaccess or a method of php to solve this.

 

# php
$dash_switch = 1;

$folder = ($dash_switch == 1) ? "himages" : "h-images";

# if 1 folder = himages ;;; no hyphens
# if 0 folder = h-images ;; hyphens.

 

.htaccess wise

 

RewriteEngine On

RewriteRule ^/himages/([^*]*).gif$ /h-images/$1.gif [L]

# or an opposite way
RewriteRule ^/h-images/([^*]*).gif$ /himages/$1.gif [L]

This could be turned around. If you made a new folder and copied all the images to it. Then using a basic editor like notepad (I have to because php designer dosn't work for me here). Open each one in notebad and do a search replace. It would take time. but when done delete the old folder.

Pay some kid a few quid to do it.

 

Desmond.

 

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.