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

Update hard-coded domain #10

Open
Garconis opened this issue May 10, 2018 · 2 comments
Open

Update hard-coded domain #10

Garconis opened this issue May 10, 2018 · 2 comments

Comments

@Garconis
Copy link

It would be nice if this plugin did 1 of these two things:

  • Automatically used the domain that was added to Site Address within Settings > General.
  • Alternatively, have the plugin auto detect the URL rather than hardcoding it. Below is an example of what I've been using.

In addition, I think it would be beneficial if the "default" protocol was https instead of http. Especially since most sites these days should/are using https now. If someone needs http (non-s), they could be the ones to update the file... rather than forcing us who are following best practices by already using https.

#www to non-www
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@arunbasillal
Copy link
Contributor

Hello @Garconis

Which helper plugin are you talking about here?

@Garconis
Copy link
Author

Htacess, of course: https://github.com/wp-media/wp-rocket-helpers/tree/master/htaccess/wp-rocket-htaccess-nonwww-www

Would also be nice to have a single htacess helper, where all the options can me toggled on a page.

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

2 participants