...

View Full Version : htacess freaks out there, help needed!



Dhuan
04-04-2011, 09:21 AM
So i've set my htacess up so that it always redirects to index.php, that way I can manipulate URL and make my website works like "www.website.com/pageIwantToView". so the php looks for pageIWantToView.php on 'pages' directory.

So far so good, but now the problem is, when i type "www.wesite.com/pagex/argumentx" i've got problems, cos when the website tries to display pictures, it looks for them on "pagex" directory, which, of course, doenst exist.

And no, I cant simply put a "/" on the beginning of the image's SRC because the website is not stored on the root directory. I need a trick to make the image's src always look for images in the directory i want.

any idea?

abduraooft
04-04-2011, 09:39 AM
Take a look at http://www.codingforums.com/showthread.php?p=784167#post784167

Dhuan
04-04-2011, 08:36 PM
thanks but it has nothing to do with my problem.
Simply using absolute path starting with "/" won't help because my website is stored at "C:/Program Files/EasyPHP/www/mywebsite" but then when my website is done and i decide to upload it on an online server the source path wont be same, and i dont want to have the problem of changing all the img src's everytime i switch them

abduraooft
04-04-2011, 09:39 PM
thanks but it has nothing to do with my problem.
Simply using absolute path starting with "/" won't help because my website is stored at "C:/Program Files/EasyPHP/www/mywebsite" but then when my website is done and i decide to upload it on an online server the source path wont be same, and i dont want to have the problem of changing all the img src's everytime i switch them
Now, that's another question! You may configure a virtual host under your local machine, say yoursite.com and operate as if on the main server. Read http://bugsmode.blogspot.com/2007/11/creating-virtual-host-in-apache-windows.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum