4
在搜索了很多帖子之後,我發現它們有些不同,但我現在無法處理。請原諒我這件事。這是張貼在這裏我已經試過:.htaccess重定向除特定頁面以外的幾頁重定向的所有頁面
- How to Redirect All urls to a new domain in apache, except one
- .htaccess rule redirect all pages except a few provided ones
- How to 301 redirect all pages from one domain to one single page on a different domain
這是我想後天:
- 在www.olddomain所有網址.com permanint重定向到www.exampledomain.com/page,
- 和www.olddomain.com有一個頁面,應該重定向到www.exampledomain.com/pagesample
請注意:老olddomain.com沒有文件除了指數,這htaccess的,而www.exampledomain.com是一個WordPress站點。
在此先感謝
謝謝f或快速回復。它有很大幫助,但第二個條件('RewriteCond%{HTTP_HOST}。* olddomain \ .com $ RewriteRule^/(。*)http://www.exampledomain.com/page/$1 [L,R = 301]')沒有工作。但是,當我在'RewriteRule^/(。*)http:' - >'RewriteRule ^(。*)http:'中刪除**斜線(/)**似乎工作正常。 – jho1086