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

**URL:** https://forum.pinegrow.com/t/unable-to-link-to-www-example-com-page-using-directory-page-index-html/8736
**Category:** Bug Reports
**Tags:** bug
**Created:** [March 2, 2024, 3:10am UTC](https://forum.pinegrow.com/t/unable-to-link-to-www-example-com-page-using-directory-page-index-html/8736 "2024-03-02T03:10:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tapatatas](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tapatatas](https://forum.pinegrow.com/u/tapatatas)
#### Post date: [March 2, 2024, 3:10am UTC](https://forum.pinegrow.com/t/unable-to-link-to-www-example-com-page-using-directory-page-index-html/8736/1 "2024-03-02T03:10:14Z")

</div>

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:

```RewriteEngine
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?

---

<div class="post-metadata">

### Author: ![mxs](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/mxs/32/2943_2.png) [@mxs](https://forum.pinegrow.com/u/mxs)
#### Post date: [March 4, 2024, 3:18pm UTC](https://forum.pinegrow.com/t/unable-to-link-to-www-example-com-page-using-directory-page-index-html/8736/2 "2024-03-04T15:18:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)
#### Post date: [March 5, 2024, 8:17am UTC](https://forum.pinegrow.com/t/unable-to-link-to-www-example-com-page-using-directory-page-index-html/8736/3 "2024-03-05T08:17:52Z")

</div>

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.

> [@mxs](#):
>
> 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.

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.
