README
Boilerplate Hypertext Access File
A boilerplate hypertext access file.
All requests made to your website that are not already in the "public" subdirectory when using this hypertext access file will be redirected to the "public" subdirectory and the uniform resource locator will be rewritten to hide the "public" subdirectory.
Requirements
- The Apache rewrite module must be enabled.
Installation
- Open your terminal.
- Change your terminals working directory to your websites project folder:
cd "path/to/my/websites/project/folder"
- Clone this repository:
git clone "https://github.com/AndrewJR291198/Boilerplate-Hypertext-Access-File.git" "boilerplate-hypertext-access-file.git"
- Create a relative symbolic link from "boilerplate-hypertext-access-file/src/.htaccess" to ".htaccess":
Windows:
mklink ".htaccess" "boilerplate-hypertext-access-file\src\.htaccess"
Unix:
ln -s ".htaccess" "boilerplate-hypertext-access-file\src\.htaccess"
- Alternatively you can copy "boilerplate-hypertext-access-file/src/.htaccess" to ".htaccess" if you don't want it to updated automatically when you
git pull
.
cp "boilerplate-hypertext-access-file\src\.htaccess" ".htaccess"
Updating
- Open your terminal.
- Change your terminals working directory to your websites project folder:
cd "path/to/my/websites/project/folder"
- Pull new commits from this repository.
git -C "boilerplate-hypertext-access-file" pull
Examples:
- A request to a resource not in the "public" subdirectory:
Requested uniform resource locator: http://localhost/index.html
Redirected uniform resource locator: http://localhost/public/index.html
Rewritten uniform resource locator: http://localhost/index.html
- A request to a resource in the "public" subdirectory:
Requested uniform resource locator: http://localhost/public/index.html
Rewritten uniform resource locator: http://localhost/index.html