Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
请帮助,我需要我的第二个域简化第一个域上的 URL,如下所示:
http://second.domain/"username_variable"
显示
http://first.domain/jobseeker/site/cv/username/"username_variable"
第二个域是第一个域的附加域。
我可以用 htaccess 做到这一点吗?
在第二个域的文档根目录中的 htaccess 文件中:
RewriteEngine On RewriteCond %{HTTP_HOST} second.domain [NC] RewriteRule ^(.*)$ http://first.domain/jobseeker/site/cv/username/$1 [L,R=301]