Unable To Link To "www.example.com/page" Using Directory "/page/index.html"

I’m trying to get links to show without the .html extension by nesting my files inside of folders (ie. linking to www.example.com/page by setting up my file structure to be /page/index.html). When I test my website using WAMP, it works fine, but when I test it using the Pinegrow “preview page in browser” feature, I get the error Error: EISDIR: illegal operation on a directory, read.

I also tried to achieve the same effect by moving page.html to the root directory and then adding this to the .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html

but it seems like the .htaccess file was just ignored.

Is this a bug, or is this just a limitation of Pinegrow?

This is a long-reported problem - Pinegrow doesn’t have a server built in.
Same problem if you use PHP (the most common of scripting languages)
This is why it works with WAMP.
If you upload it to your Internet server, it should be fine.
Pinegrow is an excellent programme if you want to learn Bootstrap or Tailwind, but other than that, it panders to WordPress users and bloated websites.
I really can’t understand why you can’t map preview mode to localhost.

Good news @tapatatas @mxs PG internal web server now looks for index.html if a directory is accessed. So …/page/ should now open …/page/index.html. Note that the / at the end of …/page/ is important for correctly resolving urls. (Out in the next update)

For example, if page/index.html includes image with src=image.jpg, accessing it without trailing / (dir/page) will look for image at dir/image.jpg. This has nothing to do with PG, just mentioning it here.

Personally, I’m a fan of static HTML sites and would say that PG is perfect for that. WP support is just an add-on that also generates WP native projects with minimal overhead. How bloated the site gets, is 100% in the hands of the developer.

5 Likes