如何在Linux Web服务器上创建快捷方式文件夹?

12

我在我的网页服务器上有一些文件夹链接到其他文件夹。

我想知道这是如何实现的?

例如: 我希望http://www.example.com/public_html/css/指向http://www.example.com/public_html/wp-content/themes/theme-name/css/


你的 public_html 在一个 public_html 中吗? - Book Of Zeus
2个回答

12

最简单的方法是创建一个符号链接,像这样:

cd /path/to/public_html/
ln -s /path/to/public_html/wp-content/themes/theme-name/css/ css

示例:

cd ~
ln -s wp-content/themes/theme-name/css/ css

3
+1,好回答。不需要创建逻辑来在.htaccess或配置文件中实现这个功能,这样执行速度更快。 - Gabriel
2
通过使用所有的.htaccess和mod_rewrite,我们停止思考最简单的解决方案,而在这种情况下,最好的解决方案是什么!做得好!你得到了我的+1。 - Pat R Ellery

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接