Posts: 2
Threads: 2
Joined: Jun 2010
If there is a directory with the same name as a page in GS, its content will be showed rather than the page.
For example:
create a dir named "download" on GS path.
create a file in GS and name the slug/url "download"
If you navigate to "localhost/download" it will show the contents of "download" directory.
Posts: 972
Threads: 27
Joined: Aug 2009
That’s the whole idea with GetSimple, the system takes all unexisting URLs (when Fancy URLs are turned on) and tries to parse them. If a URL points to an existing thing it will never try to parse that URL through GetSimple.
You could “fix†this by changing the HTACCESS-file, take these rows away:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
They tell the server to only parse URLs when files do not exist. Without these rows ALL URLs will be parsed. I don’t know whether this will break anything else though …
Posts: 3,491
Threads: 106
Joined: Mar 2010
kcsoft Wrote:If you navigate to "localhost/download" it will show the contents of "download" directory.
If your server allows directory listing (nothing strange), that will happen with any directory that has no default index file (index.html, index.htm, index.php, etc.) inside: a list of files will be shown even if GetSimple is not installed.
To fix this you can create an empty index.html file in the directory.
Posts: 3,491
Threads: 106
Joined: Mar 2010
2010-06-20, 16:02:34
(This post was last modified: 2010-06-20, 16:04:07 by fotothink.)
kcsoft Wrote:If there is a directory with the same name as a page in GS, its content will be showed rather than the page.
I find this a feature, :-) not a problem. It gives the possibility to easily add links in the site menus to other pages in the site that aren't created/managed with GetSimple but share the same directory (or are in subdirectories).
To avoid problems with a user creating a page with the same slug as a directory, you could use some "_" character in the directory's name:
SITE/_download/
SITE/download_folder/