Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-25-2012, 02:25 PM   PM User | #1
jon22
New Coder

 
Join Date: Sep 2009
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
jon22 is an unknown quantity at this point
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
jon22 is offline   Reply With Quote
Old 01-25-2012, 02:48 PM   PM User | #2
jon22
New Coder

 
Join Date: Sep 2009
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
jon22 is an unknown quantity at this point
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
jon22 is offline   Reply With Quote
Reply

Bookmarks

Tags
include, path, rel, url

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:50 AM.


Advertisement
Log in to turn off these ads.