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 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Relative url problem in url/sub/sub/ directory

    Im struggling with relative urls for a file in a 2nd level sub directory, basically i have url.com/sub1/sub2/file.php

    How can i call the files for file.php?

    Im using these urls at the moment which works in DW design view but not on localhost in the browser

    Code:
    <link href="../../style/main_stylesheet.css" rel="stylesheet" type="text/css" />
    
     <?php include('../../includes/scripts.php'); ?>
    The include files are located url.com/includes/header.php etc

    I am using
    Code:
    <base href="http://localhost/site />
    in the head

    Well and truly confused because it works for files in the first sub folder using ../includes

  • #2
    New Coder
    Join Date
    Sep 2009
    Posts
    20
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    I cant believe its taken me 20 minutes to realize what i was trying to do is completely pointless.

    It was for seo purposes but I can just rename the files and stick them all in the main directory instead. hell of a lot easier


  •  

    Tags for this Thread

    Posting Permissions

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