RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
Same as Michael’s except this one works 😛
Related Posts:
- htaccess – Redirect to subfolder without changing browser URL
- How to remove wordpress directory slash
- How to remove .html from URL?
- How to remove .html from URL?
- .htaccess Remove WWW from URL + Directories
- Safely redirect old WordPress blog links to new WP blog
- Masking wp-content/themes/name/images to just images directory using htaccess
- Making a plugin file accessible via url rewrite?
- How to change default page slug?
- How to map permalinks with accented letters to sanitized slugs?
- Removing rules from .htaccess
- Sub domain redirection to taxonomy
- How to? Redirect /category/sci-fi/ to /category/scifi/?
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Redirecting all old links from previous EE site to new WP site in one go?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Rewrite WordPress Custom URL
- Using WP rather than .htaccess to redirect pages/posts
- Custom rewrite rule
- Menu links only using http after enabling https, unable to redirect http links
- How to create a 301 redirect that doesn’t apply to subsites
- Why does multisite bypass WordPress for wp-content, wp-admin, wp-includes and .php files?
- Alias ‘wp-content’ directory to something shorter (framework?)
- Rewrite rule to load images from production does nothing
- Remove base slug in permalinks of hierarchical custom post type
- How to disable the default WordPress redirect to non-www URLs?
- WordPress rewrite rules don’t need ^?
- Why is my mod_rewrite not working?
- add_rewrite_rule fro html to another url not working
- Adding rewrite rules directly to .htaccess file
- Double domain name in category URL-s
- .htaccess rule to redirect old URLs to new structure [closed]
- Rewrite Preview URL to include index.php
- a one-off rewrite rule
- How to configure Multisite Network with randomized hostnames?
- Change htaccess to redirect to index.php in subfolder
- Wrong Redirect/Rewrite Rules?
- Wildcard forward all posts and pages with few exceptions
- Redirections and rewrites to subdomain
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- How To Fix A Redirect Chain
- Redirect a Blogger Page URL to wordpress
- Map secondary domain to other’s virtual subfolder
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- Redirect – remove custom query string
- Rewrite vs Redirect from ?p={ID}
- mod-rewrite exception? keep #hash in matching urls?
- Is WordPress API visible from PHP file called in htaccess
- Edit Permalink Structure For Custom Post Type or Modify .htaccess?
- Redirect htaccess [closed]
- force www rewrite if wordpress put in a folder
- 301 Rewriting htaccess
- 404 redirect based on url
- Custom permalink structure with %postname% in front of domain name
- How do I make WordPress revise an .htaccess file a certain way?
- Understanding Redirects
- Pretty URL via Rewrite
- URL Rewrite 404
- Fresh install redirects to www, breaking page loads
- Cannot get 301 redirection in htaccess to work (either Redirect or Rewrite)
- WordPress Category url redirects to subdomain
- htaccess and redirect to new url using regex
- ModRewrite not working properly
- Redirect A URL Pattern In WordPress Using .htaccess
- Migration from old CMS to WordPress 301 redirection rules?
- WordPress on a subfolder but accessible from root
- Changes done to .htaccess are not getting reverted back
- Can’t get pretty permalinks to work without index.php
- How to redirect a virtual page (e.g. /blog) to the home page?
- Add rewrite endpoint and .htaccess
- Post pages are redirecting to the 404 page in wordpress
- URL rewriting problem
- Allow requests to resources outside the wordpress folder
- The wp-admin url for each site does not work on WordPress multisite
- How do I make a redirect in PHP?
- How do I make a redirect in PHP?
- How to redirect all HTTP requests to HTTPS
- How can I use an .htaccess file in Nginx?
- Change PHP version on server using either .htaccess or php.ini
- .htaccess – how to force “www.” in a generic way?
- Access-Control-Allow-Origin Multiple Origin Domains?
- wordpress image upload error and htaccess rule explanation
- How does RewriteBase work in .htaccess
- CodeIgniter removing index.php from url
- .htaccess deny from all
- Server unable to read htaccess file, denying access to be safe
- Getting a 500 Internal Server Error on Laravel 5+ Ubuntu 14.04
- Redirect non-www to www in .htaccess
- Using Errordocument 401 leads to blank page
- Redirect old php link to wordpress link in .htaccess
- Redirect old php link to wordpress link in .htaccess
- Double slashes on WordPress Admin URL redirects to wp-login
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- How to create custom URL routes?
- remove “index.php” from permalinks
- “Too many redirects” ONLY when trying to access wp-admin page
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?