Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Site Tree

Featured Replies

I was looking for a particular page on a site (http://url.com/category/page). Notice the page suffix has been removed. Not finding what I was looking for I decided to backspace the url to the category level. Low and behold the site tree appears showing all files in that directory).

 

My question is this: 1 - How and why does this happen? and 2 - How can I make sure this does not happen to me?

 

Please advise for sites built with both a cms (like wordpress) and straight html in a single directory on the host. Thank you.

That really depends on the CMS and system it uses for creating URL's.

 

For straight HTML you'd create a folder called "category", and inside that place your documents, eg your site structure may be something like, the key is to always have an index.html file in each folder to prevent "directory browsing";

 

index.html (home page)

/category (folder)

-- index.html

-- page.html

- anotherpage.html

 

As for stopping various CMS's doing it you probably need to query the URL to see if there's any content to show for the available URL segments, otherwise redirect to another page. For instance if someone goes to example.com/category and there was no content to show trigger a 404 redirect (page not found).

 

Each CMS has it's own methods for doing this, eg in ExpressionEngine you'd add a simple tag in the category index template to redirect /category to a 404 page.

{if segment_2 == ""}{redirect="404"}{/if}

You'd need to check the docs for whatever CMS you're using to see what methods are available for that system.

Edited by BlueDreamer

  • 1 month later...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.