1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod rewrite sub-directories issue

Discussion in 'Apache' started by Thorr, Sep 15, 2005.

  1. #1
    Greetings everyone,
    I just discovered your great forum, and I want to ask something what is probably trivial to many of you:
    I have a PHP site, and I want to change the urls to seo friendly manner: http://domain/manufacturers.php?code=XYZ to http://domain/manufacturers/XYZ/

    I put in .htacces file:
    RewriteEngine On
    RewriteRule ^manufacturers/(.*)/$ manufacturers.php?code=$1

    but the issue is the graphics for manufacturers page are not displayed. The physical directory structure is:
    /images/ - where the graphics are located
    manufacturers.php
    ...
    the rest of the files. I guess that my images are not found because the url is domain/manufacturers/XYZ/ but I don't know how to solve this (it's my first attempt to use mod rewrite).

    I hope I didn't bother anyone with such a long post and I was clear enough to describe my problem.
    Thanks.
     
    Thorr, Sep 15, 2005 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    What does the <IMG SRC=URL"> look like. Odds are it's set up so the browser thinks it's from the rewrited URL (/manufacturers/images/ ?). Put the full URL in the code, or if the URL part doesn't start with / add one and see if that fixes it.
     
    Nintendo, Sep 15, 2005 IP