Where are you trying to do the force redirect? I think the best place for this may be in a .htaccess file. Something like
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]
Related Posts:
- add_rewrite_rule: $matches var not replaced by captured value
- Custom permalinks with NextGEN Gallery
- How to change default page slug?
- Will references to ugly links automatically redirect to their pretty url permalink?
- How do I add a add_rewrite_rule without it redirecting?
- WP Login forms action URLs displayed as pretty URLs in browser (ex with Restore Password)
- Sub domain redirection to taxonomy
- WordPress Network on IIS7/SQL Server – Rewrite Issues
- 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
- WordPress removes spaces in URL on pagination
- Custom rewrite rule
- Home page with Polylang redirects to other page [closed]
- expecting 404 but redirecting to post with url subdirectory in post title
- Alias ‘wp-content’ directory to something shorter (framework?)
- Is there a ‘rake routes’ for wordpress?
- Remove Query String from URL on Redirect – Redirection Plugin
- How to disable the default WordPress redirect to non-www URLs?
- How to change the main site url on a multisite installation (network)?
- add_rewrite_rule fro html to another url not working
- Double domain name in category URL-s
- WordPress redirects non-existing url to existing ones – how to disable
- Rewrite Preview URL to include index.php
- How to disable URL rewriting for specific URLs?
- How to configure Multisite Network with randomized hostnames?
- Can I change default registration link (without htaccess)?
- How do I display only the parent page in the url
- How to remove wordpress directory slash
- Wildcard forward all posts and pages with few exceptions
- Redirect HTTP to HTTPS for all sub domains (blog posts)
- How to redirect large amount of URLs?
- Redirecting /px/?q=x to /px/x/
- URL redirect on updating the post date
- How to redirect a link to a new link?
- ReWrite rule for files of a previously standalone blog moved to network
- Rewrite vs Redirect from ?p={ID}
- 301 Redirect all posts urls from .html to / (without .html)
- Is WordPress API visible from PHP file called in htaccess
- Re-directing URLs with dates to URLs without dates
- Redirect htaccess [closed]
- How to redirect Webp files?
- 301 Rewriting htaccess
- 404 redirect based on url
- How to Force WWW. in Domain With WordPress MU Domain Mapping Plugin?
- How are rewrite rules applied in WordPress?
- Redirect to new domain that serves new and different content
- Redirect users with “.” (dot) in their username and replace with “-” (dash) to correct profile
- Redirect empty search to another page
- i want to change URL of WordPress image or rewrite in runtime
- Remove part from dynamic url and redirect
- Fresh install redirects to www, breaking page loads
- Broken page redirect
- Make URL like /fr/something display same as /something
- Remove trailing slash
- 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 create short urls for sharing and downloadable content?
- Redirect A URL Pattern In WordPress Using .htaccess
- URLs ending with number higher than 2147483647 redirects to to domain.com/2147483647
- Migration from old CMS to WordPress 301 redirection rules?
- Changes done to .htaccess are not getting reverted back
- WordPress 3.0 Multisite – Child sites and backends appearing blank
- How to change search url produced by ‘s GET method?
- Using .htaccess to redirect /da/ to / in URL
- openlitespeed rewrite rules conversion from apache
- Allow requests to resources outside the wordpress folder
- How do I remove a rewrite rule?
- Use subdomain for certain urls
- Can I call a custom plugin with a direct URL
- Custom slug in front of search URL
- Display posts with author in the url with custom post types
- Clash of the rewrites
- Query Vars for the Homepage?
- Disable wordpress pagination URL rewrite for specific page
- How to use Post Custom Metadata in Post Titles and Post Permalinks
- Custom rewrite rules are sending everything to index.php
- Add .html extension to only one page in my WordPress site
- Migrating a page to be an article
- Multiple Permalinks for Same Post
- Remove “/page/1” from the URL
- wordpress multisite subsite rewrite rules not working for videos
- hard flush_rewrite_rules() not regenerating .htaccess
- Nginx rewrite rules
- Use custom template on certain URLs
- How do I redirect to a non-www version and make it the default URL?
- A clean custom rewrite rule for weekly archives
- Redirect old uploads after moving to multisite
- Custom rewrite after the default term link URL
- How can I reduce the number of rewrite rules?
- Create a page that can be used for different URLs
- Two installs conflicting – Pages redirecting
- Add NUMBER in WordPress URL
- How to customize the Lost Password URL?
- Multisite (with nested paths) wp-admin redirect loop
- Usw add_rewrite_rule to display frontpage on specific page
- WordPress post-type create url rewriting
- How do I change my WordPress website’s address or URL?
- Rewrite URLs in a Custom Post Type with Multiple Taxonomies
- How to disable WordPress canonical redirect to nearest matching URL and force 404 Page?