具体的子域名指向一个路径和动态的子域名指向到其他路径路径、域名、具体、动态

2023-09-02 10:03:06 作者:墨染倾城色

我开发一个应用程序,我有一些具体的子域,请参阅:

I am developing an application where I have some specific subdomains, see:

www.120mmsm.com是网站 - 确定 signup.120mmsm.com是注册页面 - 错误 login.120mmsm.com是登录页面 - 错误 anything.120mmsm.com是倒在系统文件夹 - 确定

所以,该网站是响应在万维网。动态子域已经能够做到。但注册和登录陷入不能在不同的文件夹。给,你可以看到,当你进入上面的网址。

So the site is responding at www. The dynamic subdomain has managed to do. But the signup and login to fall into different folders can not. Give and you can see when you enter the urls above.

我的htaccess code:

My htaccess code:

#does nothing if www
RewriteRule ^www/ - [L] 

#Force https for everything that is not www
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !(www). [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

#signup
RewriteCond %{HTTP_HOST} ^(signup). [NC]
RewriteRule ^(.*)?$ signup/$1 [L]

#login
RewriteCond %{HTTP_HOST} ^(login). [NC]
RewriteRule ^(.*)?$ login/$1 [L]

#system
RewriteCond %{REQUEST_URI} !^/sistema/
RewriteCond %{HTTP_HOST} !www.120mmsm.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www|singup|login)?([a-z0-9-]+).120mmsm.com [NC]
RewriteRule ^(.*)?$ sistema/$1

我在哪里错了?

Where am I wrong?

推荐答案

你得到什么样的错误呢?你确定你的Apache的配置正确?

What type of error did you get? Are you sure you have the right configuration of Apache?