我需要帮助屏蔽的URL。我有我不想让别人知道我网站上的一个子域。所以,我所需要的帮助是这样的:
I am need help "masking" a url. I have a subdomain that I do not want people to know about on my website. So what I am needing help with is this:
我的网站是:www.example
My website is: www.example
我有一个子域:sub.example/test.php
I have a subdomain: sub.example/test.php
当有人点击指向sub.example/test.php~~V一个链接,我不希望sub.example/test.php在地址栏显示。我想为www.example显示代替。
When someone clicks on a link that points to sub.example/test.php, I do not want "sub.example/test.php" to show in the url bar. I would like for www.example to show instead.
任何帮助是极大AP preciated!
Any help is greatly appreciated!
推荐答案当你要链接到 sub.example/test.php ,更改链接别的东西,像 www.example/sub/test.php 什么的。然后在文档根.htaccess文件的 www.example 补充一点:
When you want to link to sub.example/test.php, change the link to something else, like www.example/sub/test.php or something. Then in your .htaccess file in the document root for www.example add this:
RewriteEngine On RewriteRule ^sub/(.*)$ sub.example/$1 [L,P]这将内部代理的 www.example/sub / 到 sub.example 任何要求。所以,当有人请求 www.example/sub/path/file.html ,他们真正得到 sub.example/path/file.html 但他们的URL地址栏还是有example URL。你只需要确保改变所有的链接sub.example到example/sub~~V /
This will internally proxy any request for www.example/sub/ to sub.example. So when someone requests www.example/sub/path/file.html, they really get sub.example/path/file.html except their URL address bar still has the example URL. You just need to make sure to change all of your links to sub.example to example/sub/
更多推荐
需要帮助屏蔽网址
发布评论