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.
我有一个像“360research.pchealth.ca”这样的域,如果用户点击“360research.pchealth.ca/admin”,系统将进入 ADMIN 文件夹,但是如果用户点击“360research.pchealth.ca”,我需要它转到 ADMIN 但不在 URL 中显示用户在 ADMIN 文件夹中。
将其放入文档根目录的 htaccess 文件中:
RewriteEngine On RewriteCond %{HTTP_HOST} 360research\.pchealth\.ca [NC] RewriteCond %{REQUEST_URI} !^/admin/ RewriteRule ^(.*)$ /admin/$1 [L]