You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

网站重定向失效求助:recruitcrm.io域名跳转异常修复方案

Fixing www to non-www Redirects with Path Preservation for recruitcrm.io

Hey there! Let's get that redirect issue sorted out for your site. Right now, any request to the www.recruitcrm.io domain (even ones with specific paths like /pricing) is bouncing straight to the homepage, but we need to make sure the path stays intact when stripping the www prefix. Here's how to fix this based on your server or CDN setup:

Apache (using .htaccess)

If your site runs on Apache, update your .htaccess file in the root directory of your site with these rules to handle the redirect while preserving the full request path:

RewriteEngine On

# Redirect www.recruitcrm.io to recruitcrm.io, keeping the request path
RewriteCond %{HTTP_HOST} ^www\.recruitcrm\.io$ [NC]
RewriteRule ^(.*)$ https://recruitcrm.io/$1 [L,R=301]

Quick breakdown:

  • [NC] makes the host check case-insensitive (so WWW.RecruitCRM.io will also redirect correctly)
  • $1 captures everything after the domain (like /pricing or /contact) and appends it to the non-www URL
  • R=301 sets a permanent redirect, which is best for SEO and tells browsers to remember the new URL long-term

Nginx

For Nginx servers, modify your server configuration files to add a dedicated block for the www subdomain:

# Handle www subdomain redirects
server {
    listen 80;
    listen [::]:80;
    server_name www.recruitcrm.io;

    # Redirect to non-www with full path preserved
    return 301 https://recruitcrm.io$request_uri;
}

# Your main non-www server block (keep your existing config here)
server {
    listen 80;
    listen [::]:80;
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name recruitcrm.io;

    # Add your existing SSL, root location, and other site configs here
}

Quick breakdown:

  • $request_uri includes the full path and any query parameters from the original request, so /pricing?plan=pro will redirect to https://recruitcrm.io/pricing?plan=pro
  • The 301 permanent redirect ensures search engines update their indexes to the non-www URL

Cloudflare (if using CDN)

If you're using Cloudflare to manage your site, you can set up a Page Rule to handle the redirect without touching server configs:

  1. Go to your Cloudflare dashboard → Rules → Page Rules
  2. Create a new rule with:
    • URL match: www.recruitcrm.io/*
    • Setting: Forwarding URL → 301 Permanent Redirect
    • Destination URL: https://recruitcrm.io/$1
  3. Save the rule and wait a few minutes for changes to propagate

Quick breakdown:

  • The * in the match URL captures any path after the domain, and $1 inserts that path into the destination URL, preserving your original request

Important Notes:

  • Clear browser cache: Before testing, clear your browser's cache or use incognito mode—old redirects might be cached and interfere with your new setup
  • SSL coverage: Make sure your SSL certificate covers both recruitcrm.io and www.recruitcrm.io to avoid security warnings during redirects
  • Test all cases: Verify that https://www.recruitcrm.io, https://www.recruitcrm.io/pricing, and https://recruitcrm.io/pricing all behave as expected

内容的提问来源于stack exchange,提问作者Sagar Khanapurkar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 08:18:06