【问题标题】:making subdomains out of a url?用 url 制作子域?
【发布时间】:2011-06-01 16:34:16
【问题描述】:

我有这个网址

http://www.example.com/user.php?user=solomon

我想把它转换成

http://solomon.example.com

我该怎么做!!谢谢:))

附言我正在使用 plesk

【问题讨论】:

    标签: url .htaccess subdomain wildcard-subdomain


    【解决方案1】:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^http://domain\.com
    RewriteRule ^user.php http://domain1.com [R=301, L]
    

    【讨论】:

    • 感谢您的回答,但我没有看到其中包含的 user.php,它是如何知道的? :))
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-18
    • 1970-01-01
    • 2018-04-24
    • 1970-01-01
    • 1970-01-01
    • 2018-10-21
    相关资源
    最近更新 更多