mirror of
https://github.com/strapi/strapi.git
synced 2025-09-18 04:47:27 +00:00
Remove htaccess file
This commit is contained in:
parent
0d984835a1
commit
c770161d78
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -47,9 +47,6 @@
|
|||||||
*.tmpl text
|
*.tmpl text
|
||||||
*.phtml text
|
*.phtml text
|
||||||
|
|
||||||
# server config
|
|
||||||
.htaccess text
|
|
||||||
|
|
||||||
# git config
|
# git config
|
||||||
.gitattributes text
|
.gitattributes text
|
||||||
.gitignore text
|
.gitignore text
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
<ifModule mod_rewrite.c>
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# GENERAL #
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
# Make apache follow sym links to files
|
|
||||||
Options +FollowSymLinks
|
|
||||||
# If somebody opens a folder, hide all files from the resulting folder list
|
|
||||||
IndexIgnore */*
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
|
||||||
# REWRITING #
|
|
||||||
#######################################################################
|
|
||||||
|
|
||||||
# Enable rewriting
|
|
||||||
RewriteEngine On
|
|
||||||
|
|
||||||
# If its not HTTPS
|
|
||||||
RewriteCond %{HTTPS} off
|
|
||||||
|
|
||||||
# Comment out the RewriteCond above, and uncomment the RewriteCond below if you're using a load balancer (e.g. CloudFlare) for SSL
|
|
||||||
# RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
|
||||||
|
|
||||||
# Redirect to the same URL with https://, ignoring all further rules if this one is in effect
|
|
||||||
RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R,L]
|
|
||||||
|
|
||||||
# If we get to here, it means we are on https://
|
|
||||||
|
|
||||||
# If the file with the specified name in the browser doesn't exist
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
|
|
||||||
# and the directory with the specified name in the browser doesn't exist
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
|
||||||
|
|
||||||
# and we are not opening the root already (otherwise we get a redirect loop)
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !\/$
|
|
||||||
|
|
||||||
# Rewrite all requests to the root
|
|
||||||
RewriteRule ^(.*) /
|
|
||||||
|
|
||||||
</ifModule>
|
|
@ -6,10 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
// import 'babel-polyfill';
|
// import 'babel-polyfill';
|
||||||
|
|
||||||
/* eslint-disable import/no-unresolved */
|
|
||||||
// Load the manifest.json file and the .htaccess file
|
|
||||||
import '!file?name=[name].[ext]!./manifest.json';
|
|
||||||
import 'file?name=[name].[ext]!./.htaccess';
|
|
||||||
/* eslint-enable import/no-unresolved */
|
/* eslint-enable import/no-unresolved */
|
||||||
// Import all the third party stuff
|
// Import all the third party stuff
|
||||||
// import React from 'react';
|
// import React from 'react';
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 361 KiB |
@ -1,18 +0,0 @@
|
|||||||
# Server Configurations
|
|
||||||
|
|
||||||
## Apache
|
|
||||||
|
|
||||||
This boilerplate includes a `.htaccess` file that does two things:
|
|
||||||
|
|
||||||
1. Redirect all traffic to HTTPS because ServiceWorker only works for encrypted
|
|
||||||
traffic.
|
|
||||||
1. Rewrite all pages (e.g. `yourdomain.com/subpage`) to `yourdomain.com/index.html`
|
|
||||||
to let `react-router` take care of presenting the correct page.
|
|
||||||
|
|
||||||
> Note: For performance reasons you should probably adapt it to run as a static
|
|
||||||
`.conf` file (typically under `/etc/apache2/sites-enabled` or similar) so that
|
|
||||||
your server doesn't have to apply its rules dynamically per request)
|
|
||||||
|
|
||||||
## Nginx
|
|
||||||
|
|
||||||
Also it includes a `.nginx.conf` file that does the same on Nginx server.
|
|
@ -88,10 +88,6 @@ module.exports = require('./webpack.base.babel')({
|
|||||||
relativePaths: false,
|
relativePaths: false,
|
||||||
publicPath: '/',
|
publicPath: '/',
|
||||||
|
|
||||||
// No need to cache .htaccess. See http://mxs.is/googmp,
|
|
||||||
// this is applied before any match in `caches` section
|
|
||||||
excludes: ['.htaccess'],
|
|
||||||
|
|
||||||
caches: {
|
caches: {
|
||||||
main: [':rest:'],
|
main: [':rest:'],
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user