我想将/services/websites.html重定向到我的head目录中的websites.html。这样我就可以将我的所有文件放在head目录中,这样所有的css文件和类似的东西都可以正确链接。我想:.htaccess模拟目录
重写规则^服务/ websites.html $ websites.html
但是,这并不工作。我觉得这很简单,但我在Google上找不到任何东西。
你能帮我吗?
我想将/services/websites.html重定向到我的head目录中的websites.html。这样我就可以将我的所有文件放在head目录中,这样所有的css文件和类似的东西都可以正确链接。我想:.htaccess模拟目录
重写规则^服务/ websites.html $ websites.html
但是,这并不工作。我觉得这很简单,但我在Google上找不到任何东西。
你能帮我吗?
这是你需要把你的.htaccess代码:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase/
RewriteRule ^services/(.*)$ $1 [L,NC]
非常感谢您的帮助! – Andre 2012-02-28 19:05:52
不客气,很高兴它解决了。 – anubhava 2012-02-28 19:44:57