.htaccess 未路由到 /public_html/

发布于 2024-09-28 01:21:06 字数 865 浏览 2 评论 0原文

我似乎遇到了一个有趣的问题,因为 .htaccess 默认情况下没有路由到 /public_html/index.html ,并且我收到页面未找到错误。我确实知道最近有人篡改了该文件,但不知道他们做了什么,不幸的是我对路由一无所知。我尝试做一些研究,但没有想出任何可以解决我的困境的方法。有谁知道如何将服务器路由到 public_html ?这就是我现在所拥有的。

RewriteEngine on

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName evolvingwebcreations.com

#-------------------------
RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]
#-------------------------

RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^clients(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]

提前致谢!

I seem to be having an interesting problem in that .htaccess isn't routing to /public_html/index.html by default as it should, and I'm getting a page not found error. I do know that someone tampered with the file recently but have no idea what they did and I unfortunately know nothing about routing. I tried to do some research but didn't come up with anything that gave a solution to my predicament. Does anyone know how to go about making the server route to public_html? Here's what I have right now.

RewriteEngine on

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName evolvingwebcreations.com

#-------------------------
RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]
#-------------------------

RewriteCond %{HTTP_HOST} ^swinkapps.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.swinkapps.com$
RewriteRule ^clients(.*) "http\:\/\/127\.0\.0\.1\:12005\/$1" [P,L]

Thanks in advance!

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

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

发布评论

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

评论(1

梅倚清风 2024-10-05 01:21:06

我不相信它默认会路由到 public_html 。您需要指定

UserDir public_html

并可能设置一些访问权限,例如

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options Indexes SymLinksIfOwnerMatch IncludesNoExec
</Directory>

I don't believe it ever routes to public_html by default. You'll need to specify

UserDir public_html

and possibly set some access permissions such as

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