0

I'm working on a WP based site. I have the site of the client on my space (www.mydomainname.com/~subfolder/sub-subfolder). Now the original domain of the client is pointing to my space (www.clientdomain.com goes directly on the www.domainname.com/~subfolder/) without changing url name. But, whent it happens, the server answer giving a directory tree. I would need the site to point directly to sub-subfolder (not to ~subfolder) without giving the directory tree.

I have used this .htaccess:

<IfModule mod_rewrite.c>

Options +FollowSymlinks  

RewriteEngine on

RewriteBase /

RewriteCond &#37;{HTTP_HOST} ^(www\.)?mydomainname\.cc [NC]

RewriteRule .? http://www.mydomainname.cc/~subfolder/ [R=301,L]

</IfModule>

How can I do it? I'm sure I'm doing the same error but I can't find it... Please help me I'm going crazy!!! :)

Thank you!

4

2 回答 2

0

尝试:

RewriteRule %{DOCUMENT_ROOT}/~subfolder/sub-subfolder%{REQUEST_URI} -f [OR]
RewriteRule %{DOCUMENT_ROOT}/~subfolder/sub-subfolder%{REQUEST_URI} -d
RewriteRule ^ /~subfolder/sub-subfolder%{REQUEST_URI} [L]
于 2012-09-13T23:59:09.513 回答
0

尝试在 ~subfolder/ 的 htaccess 中使用它:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} ^sub-subfolder
RewriteRule ^(.*)$ sub-subfolder/$1 [L,QSA]
于 2012-09-14T09:20:57.363 回答