Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    120
    Thanks
    13
    Thanked 3 Times in 3 Posts

    htacess freaks out there, help needed!

    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?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Regular Coder
    Join Date
    Mar 2009
    Posts
    120
    Thanks
    13
    Thanked 3 Times in 3 Posts
    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

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Quote Originally Posted by Dhuan View Post
    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...e-windows.html
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •