small path issue with reguller express

Discussion in 'Site & Server Administration' started by dizyn, Apr 25, 2008.

  1. #1
    Here is my express:
    # RewriteEngine on
    # RewriteRule ^shop/(.*)/ index.php [nc]
    Code (markup):


    what's is happening is its converting every .com/shop/anything/ to index.php

    its transferring correctly you can check it at http://beta.cmela.com/shop/dizyn/

    But there is problem of images and css, they are not working, what can i do for this?
     
    dizyn, Apr 25, 2008 IP
  2. bucasia

    bucasia Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    It looks like you are using relative path names instead of full path names for your images.

    ie you are using

    images/thumbs/shoes.jpg

    instead of

    /images/thumbs/shoes.jpg

    Try changing them to full path names - that should work.

    Matt
     
    bucasia, Apr 25, 2008 IP
  3. dizyn

    dizyn Active Member

    Messages:
    251
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    true, I am using relative paths

    But i wanted to know is there a way i can rewrite them instead of making abs.
     
    dizyn, Apr 25, 2008 IP
  4. bucasia

    bucasia Peon

    Messages:
    50
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could do that by creating a symlink in your shop/dizyn folder?

    cd shop/dizyn
    ln -s ../../images images
     
    bucasia, Apr 25, 2008 IP