[PHP]Issue with Permalinks

Discussion in 'Web Design & Coding' started by Grandmaster, Sep 11, 2004.

  1. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    If I enable permalinks on my site, the rotating header does not display. Upon further investigation, I believe that is caused by putting a forward slash in the URL. For example, if you click this , the header will not display. But if you click this, it will.

    Anyone have an idea what's causing this annoying problem?
     
  2. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    I know why. :p.

    What you need to go is to the source.

    Code:
    <img src="header.php" width="865px" height="307px" alt="Random Header" />
    Now lets see a browser:

    FIrst link: http://ofg.ganai.com/index.php/header.php

    Second link: http://ofg.ganai.com/index.php remove index.php and replace with header.php http://ofg.ganai.com/header.php

    Basically, you can't use relative URL's. You will have to use full url's, or base path URL's like so:

    /header.php (Note: no period, not gauranteed to work with all browsers)

    or http://fulldomain.com/header.php
     
  3. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    not solving it, but why would you put a slash after the filename? is not normal.

    Also when you do that none of the pictures are showing. Are they in another directory? maybe putting / in it is messing with the directory structure, since you normally don't use a / for a new directory?
    perhaps
     
  4. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    The /'s automatically get added by Wordpress when I enable permalinks. But what X-istence suggested worked perfectly! Thanks :)
     
  5. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    You can put a / behind it so you can add session information and stuff without having google go "Hrm, random ****, sorry won't index" and also, it lets you do stuff like http://url.com/index.php/section/downloads/number/1/comments/add

    And then have index.php parse it.

    All you need to do is use direct URL's with full domain name and it will work perfectly, otherwise it will not, as the browser will think that it has to add on the "relative" part to what is allready in the browser bar cause it thinks that is the right directory.

    Read my above post.