An open API service indexing awesome lists of open source software.

https://github.com/sushantrahate/php-static-website-boilerplate

A lightweight, static website built with PHP, HTML, CSS, and JavaScript.
https://github.com/sushantrahate/php-static-website-boilerplate

boilerplate htaccess php robots-txt static-site

Last synced: over 1 year ago
JSON representation

A lightweight, static website built with PHP, HTML, CSS, and JavaScript.

Awesome Lists containing this project

README

          

# PHP Static Website Setup

A lightweight, static website built with PHP, HTML, CSS, and JavaScript.

## Features

- Dynamic headers, footers, and navigation included on every page.
- SEO-friendly clean URLs using `.htaccess`.
- HTTPS enforcement for security.
- Restricts access to sensitive files like `config.php`.
- Includes canonical URLs for better SEO.

## Folder Structure

```
├── config/ # Configuration files
│ └── config.php # Global constants
├── includes/ # Reusable PHP components
│ ├── header.php # Common header for all pages
│ ├── footer.php # Common footer for all pages
│ └── navigation.php # Common navigation menu
├── about.php # About page
├── contact.php # Contact page
├── index.php # Homepage
├── services/ # Services Directory
│ ├── service-details.php/ # Service Details page
├── assets/ # Static assets
│ ├── css/ # Stylesheets
│ │ └── style.css # Main stylesheet
│ ├── js/ # JavaScript files
│ │ └── scripts.js # Main JavaScript file
│ └── images/ # Image files
├── .htaccess # Rewrite rules and security settings
├── sitemap.xml # XML sitemap for SEO
├── robots.txt # Instructions for search engine crawlers
└── README.md # Project documentation
```

## .htaccess

- Ensures clean URLs like /contact instead of /contact.php.
- Enforces HTTPS for security.
- Restricts access to sensitive files.

## robots.txt

- Allow/Disallow Crawling: You can control which parts of your site search engines should or shouldn’t index.
- Link to Sitemap: Helps search engines find your sitemap for better indexing.