需要操纵我的网址

发布于 2024-12-13 15:52:47 字数 470 浏览 0 评论 0原文

我今天才刚刚开始搭建一个网站,所以我什至还没有太多可以使用的东西,但我想把它扔在那里,这样当我到达那里时我就能得到信息。我正在使用 WAMP(不确定哪个版本,但在过去 6 个月内下载)和 CodeIgniter 2.0.3。如何操作 URL 来执行以下操作:

www.mysite.com/forums ==> forums.mysite.com
www.mysite.com/pc ==> pc.mysite.com
...

这是否可以通过 htaccess 文件或其他方式完成?如果是 htaccess 文件,有人可以提供具体信息吗?我研究过一些试图解释 htaccess 文件的网站,但它们只是让我感到困惑。 :) 哈哈。哦,是的,在我的本地主机上查看它会是什么样子?目前我的网址如下:

localhost/nothingbutcards/

非常感谢大家,希望您周末愉快。

I'm literally just starting to throw a site together today, so I don't even have much to work with yet, but I wanted to throw this out there so I'll have the information when I get there. I'm using WAMP (not sure which version, but downloaded within the last 6 months) and CodeIgniter 2.0.3. How do you manipulate the URL to do the following:

www.mysite.com/forums ==> forums.mysite.com
www.mysite.com/pc ==> pc.mysite.com
...

Would this be something that gets done with the htaccess file or some other way? And if it is the htaccess file, can someone provide specifics? I've looked into some sites that try to explain the htaccess file and they just confuse the crap out of me. :) lol. Oh yeah, and how will that look while looking at it on my local host? Currently my url looks like:

localhost/nothingbutcards/

Thank you all very much, hope you're enjoying your weekend.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

楠木可依 2024-12-20 15:52:47

除了提供的参考材料之外,以下内容应该是一个很好的起点。这是一种 HTACCESS 方法。

http://terriswallow. com/weblog/2008/htaccess-redirect-a-directory-to-a-subdomain-and-force-www/

我还想提一下,一些网络主机现在将其作为选项配置面板。我的是这样的,所以我可以进去,指定一个子域及其指向的站点上的路径,然后我就完成了。

Along with the reference material provided, the below should be a good starting point. It's an HTACCESS approach.

http://terriswallow.com/weblog/2008/htaccess-redirect-a-directory-to-a-subdomain-and-force-www/

I also wanted to mention, some web hosts now have this as an option in the configuration panel. Mine does, so I can go in, specify a subdomain and the path on the site it points to, and I'm done.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文