2017-07-16 6 views
0

メインのURLにサブサイトをリダイレクトしたいと思います。.htaccessのURLを変更する

これが私の現在の.htaccessで

http://example.com/one/two

http://example.com/

から

DirectoryIndex index.html index.php index.htm parking-page.html 
 

 
RewriteEngine on 
 
RewriteCond %{REQUEST_FILENAME} !-f 
 
RewriteCond %{REQUEST_FILENAME} !-d 
 
RewriteRule ^(.*)$ /index.html?path=$1 [NC,L,QSA] 
 

 
RewriteCond %{HTTP_HOST} ^www\.example\.com$ 
 
RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L] 
 

 
#RewriteRule ^example\.org.? example\.org? [L] 
 

 
RewriteCond %{QUERY_STRING} . 
 
RewriteRule (.*) $1? 
 

 
FallbackResource index.html

答えて

0

これを試してみてください:

RewriteRule (.*) /webone/two 
+0

は、私が2 – puppeteer701

+0

リダイレクト/ webone/2 http://example.com/ –

+0

/webone /なし、example.comにexample.com/webone/twoをリダイレクトしたいと思います私は何らかの正規表現が必要だと思います。それはあらゆる種類のサブシステムを取り、インデックスにリダイレクトします – puppeteer701

関連する問題