我想301将我的旧站点重定向到新站点。我想将所有页面从旧站点重定向到新站点首页,希望所有属于该类别的页面
i.e. olddomain.com/articles/1 should be redirected to newdomain.com/articles/1
olddomain.com/articles/2 should be redirected to newdomain.com/articles/2
olddomain.com/articles/3 should be redirected to newdomain.com/articles/3
通常,我想做的是:
这是我到目前为止所做的,但是我不确定如何做第二部分。
RewriteEngine on
RewriteCond %{REQUEST_URI}!^/wp-admin/
RewriteCond {HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
感谢您的帮助。
答案 0 :(得分:0)
您可以使用此:
(Directory working: '.') allFilesMatching: '*.st' do: [ :ff |
file := FileStream open: (ff name) mode: FileStream read.
file nextLine. "How you want to print it here or somewhere else?"
file close
].