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
- Redirect entire website to a single page
- Passing parameters to a custom page template using clean urls
- WordPress mod_rewrite is canceling/overwriting my other mod_rewrite rule
- WordPress redirection problem after moving to a new server?
- How to protect media directory with .htaccess?
- Redirect all pages except one to homepage via .htaccess
- htaccess redirects and WordPress
- Custom rewrite not working
- “View post” leads to odd URL
- htaccess, site and staging in subdirectories
- URL redirect/rewrite rule wordpress multisite
- Can’t control WordPress Addresses from admin panel
- Redirecting all posts after changing URL structure with htaccess
- htaccess rewrite, adding segment to url
- How to redirect only 404 pages with htaccess in WordPress
- How to redirect the frontend of a WordPress site (only)?
- WordPress and Htaccess
- Permalinks do not include www subdomain
- How to rewrite wordpress search to work on specific category
- Simple seo-friendly custom $_GET url rewrite with htaccess
- remove SLASH on single_post but KEEP on categories and parent pages
- Rewrite Url using .htaccess or hook
- htaccess question and plugins.php
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Error 404 wordpress redirecting URL
- How To Rewrite WordPress Pages URL Only?
- WP-Include rewrite directory