大网数据广告活动
网站运营与故障问答

What is SymLinksIfOwnerMatch?

· 52CE 我爱测

What is SymLinksIfOwnerMatch in .htaccess, in layman's terms? I have this option active. Do I need it? I have a plain HTML web site (though might go for Joomla one day). Some sites specify that it replaces the FollowSymLinks that…

问题原文

原帖链接 · IceCold · CC BY-SA 3.0

What is SymLinksIfOwnerMatch in .htaccess, in layman's terms?
I have this option active. Do I need it? I have a plain HTML web site (though might go for Joomla one day).

Some sites specify that it replaces the FollowSymLinks that was disabled by some hosts such as BlueHost (yes, I am hosted there).

已采纳解答

原帖链接 · MrWhite · CC BY-SA 3.0

From the Apache docs

SymLinksIfOwnerMatch
The server will only follow symbolic links for which the target file or directory is owned by the same user id as the link.

So, enabling this option (as opposed to FollowSymLinks) prevents symbolic links being followed that might point to some critical parts of the system (where the owner of the link does not match the target file).

Do I need it? I have a plain HTML web site (though might go for Joomla one day).

If you have a plain HTML site and no fancy URLs then probably not.

However, it is required by mod_rewrite, which is required for URL rewriting. (And is required by Joomla if you enable "pretty" URLs - ie. URL rewriting.)

Some sites specify that it replaces the FollowSymLinks

SymLinksIfOwnerMatch is a more restriction option. The two are mutually exclusive.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-08-30)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。