Ok, so Pathauto does exactly what I want, i.e. auto create friendly uri paths, great!

I want to use "./" files paths to point to my root file system web folder but Path auto being Path auto changes the URI so that my path is now dosent point to the root web folder anymore..(as expected!)

e.g. Only local images are allowed.

Is there a way to escape the auto path generation so that I can still refrence the root web folder as stated above?...reason is because Im developing locally and I want to still create content with "./" so that paths dont break when I move the code to the production site.

Comments

tinils’s picture

oops! sorry, e.g code for above post

<img src="./files/images/images1.png" />
greggles’s picture

I don't see how this is a pathauto problem.

Pathauto wouldn't create an alias for files/images/images1.png since that is just an uploaded file.

Can you perhaps explain some more?

tinils’s picture

Ok, thanks for the replay. Here goes...

I have set up my nodes path as such : [termpath-raw]/[title-raw]

Thus, pathauto generates my links as http://example.com/section1/page1 etc etc...perfect!

However, when I create a page content and put

A picture of me! <img src="./files/images/me.png">

on a node page1 (under the taxonomy section1)...the img src is rendered on the node content as

A picture of me! <img src="http://example.com/section1/page1/files/images/me.png">

However, this below is what I intended

A picture of me! <img src="http://mysite.com/files/images/me.png">

Notice the src path difference?..its pretty obvious why its generating that code....which is why I asked if there was some sort of was to escape pathauto in content so I can still refrence the root path relatively...e.g

<a href="[wwroot]/files/myfile.pdf">

This is to escape pathauto in HTML ofcourse...bacause i DONT want my content creators to use php in content (I doubt my content creators even know what php is anyways...)

vm’s picture

Notice the src path difference?..its pretty obvious why its generating that code

yep you're right! It is pretty obvious! ........... You aren't calling the relative path correctly

A picture of me! <img src="./files/images/me.png"> = incorrect
A picture of me! <img src="/files/images/me.png"> = correct

*note that in the correct HTML there is no . in front of /files/

paths are relative to index.php in Drupal, as such, there is no need for ./ or ../

Feel free to mark this fixed once you see the err in your ways ; )

tinils’s picture

Status: Active » Closed (fixed)

Yes! I have seen the err in my ways!

Thank you!!! sorry for wasting everyones time though :(

greggles’s picture

Thanks VeryMisunderstood for explaining that.

Thanks tinils for your detailed description of the problem.