LoginSignup
0
0

More than 1 year has passed since last update.

Xserver htaccess

Posted at

wwwなしに統一

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.)$ https://example.jp/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^(www.example.jp)(:80)?
RewriteRule ^(.
) https://example.jp/$1 [R=301,L]
SetEnvIf Request_URI ".*" Ngx_Cache_NoCacheMode

#ドメイン変更と特定ディレクトリへ

#hoge.comにアクセスがあった場合、fuga.jp/aaaに転送する
RewriteEngine On
RewriteCond %{HTTP_HOST} ^hoge.com$ [NC]
RewriteRule ^(.*)$ http://fuga.jp/aaa/$1 [L,R=301]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0