Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating htaccess to new index.html revision? #225

Open
SamuelMiller opened this issue May 9, 2022 · 0 comments
Open

updating htaccess to new index.html revision? #225

SamuelMiller opened this issue May 9, 2022 · 0 comments

Comments

@SamuelMiller
Copy link

SamuelMiller commented May 9, 2022

Is it possible to automatically update the .htaccess file so that it points to the new version of the index.html page?
For example, "index.5dfd.html" would require editing .htaccess so that browsers know "index.5dfd.html" is the home page--
Such as

#Alternate default index page
DirectoryIndex index.5dfd.html

However, with every new revision, the .htaccess file would have to be continuously updated. Is it possible for gulp-rev-all to update the .htaccess file as well, or to use a wildcard?

For example,
#Alternate default index page
DirectoryIndex index.*.html

I don't think that will work. Maybe something like this?

RewriteEngine on
RewriteRule ^$ /index*.html [L]

I don't really know what I am doing.
Any ideas of how to point browsers to the new index-rev.html? Thanks, Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant