.htaccess rewrite将一个目录添加到url

时间:2013-07-08 11:36:06

标签: .htaccess

我有一堆重写规则,例如/ contact / to /contact.php,/ prices / to prices.php等。

我的问题是,当点击链接.... - 我得到的网址是:

http://173.254.28.59/~lpassodr/~lpassodr/contact/

而不是:

http://173.254.28.59/~lpassodr/contact/

因此无法加载contact.php,因为它不在该目录中。

这是我的.htacess:

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php

DirectoryIndex index.php index.php3 index.html index.htm

# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
Options -Indexes

RewriteEngine On
RewriteRule ^/*$ index.php
RewriteRule ^home/*$ index.php
RewriteRule ^contact/*$ contact.php
RewriteRule ^testimonials/*$ testimonials.php
RewriteRule ^prices/*$ prices.php

任何有关可能导致此问题以及如何解决问题的想法都将不胜感激!在此先感谢:)

编辑:如果有帮助,根就是http://173.254.28.59/~lpassodr/

0 个答案:

没有答案