@Sprocket: Your question makes entirely sense, and is something we are putting thought into and have already (without yet yielding any benefits). My impression from the original poster, was that his links went to files in custom folders, but you could very well be right. If you are linking to files within folders in your X3 content, you need to make sure to use the actual physical path, and not the path in the URL, which is virtual and ultimately created by
mod_rewrite:
URL
domain.com/some/folder/
Although you may have the above as URL, that is just a "rewritten" nice URL, and the actual folder PATH would look something like:
domain.com/content/2.some/4.folder/
Sprocket wrote:My site consists of over 200 blog posts. Each of these post has 1-5 photos in the blog, so let's say 3 photos average.
Just to be entirely clear, you are referring to blog posts added as X3 pages?
Just for reference, you should be able to use "root-relative" URL's, which is normally the safest. For example:
/content/3.blog/1.2010/1.0922/_pic1.jpg
As for the "URL interpreter", there are a few reasons why we use
mod_rewrite to create pretty URLs that are not identical to the physical folder path. One is the numbering sorting mechanism of course, which allows us to sort folders manually, without having to resort to saving the sort into config data files. Also, it allows us to bypass the "content" folder, which is just there to contain your content. Furthermore, it allows us to show/hide folder, or make them inaccessible, and all this while keeping the URL slug as pretty as possible for the sake of both humans and SEO.
Sprocket wrote:but is there a better way?
Yes. I entirely agree with you, and as a user, you should not have to be guessing the physical path of a file that you want to link to. A general solution to this, would be using a "shortcode", for example:
X3 would then figure out the path to the current folder, and it would keep things updated if you change the slug of the page.
We could take it a step further, and just replace the path of files you link to without a path. For example:
... would get converted to ...
<img src=content/1.real/2.path/image.jpg >
I would also like to ask, why and how exactly are you adding files to your blog pages? Are you linking to them with <a>, or are you embedding them with <img>? I am curious, because ultimately this sounds like a repetitive task that could perhaps be wrapped inside some kind of X3 feature ... For example [embed=file.jpg] or [link=file.jpg], which in addition to sorting out the path automatically, could give the benefit of adding wrapping html, styles and maybe functionality ...
X3 is primarily created as an app to get galleries automatically ... Can't you just use the gallery functions, or is it because you want to intertwine your blog text with certain images?