Thank you for your help.How do I write htaccess?
I would like to redirect from Sakura Internet's initial domain (specific directory only) to its own domain, but the following writing method does not work.Could someone tell me the installation location and how to write it?I just started operating it, but it is inconvenient to access the initial domain. Sakura's "Multidomain Destination Folder" has already been registered in shoki2/, so you can access your own domain.
Thank you for your cooperation.
Initial domain: abcd.sakura.ne.jp/
Initial Directory: abcd.sakura.ne.jp/shoki2/
↓
Redirect destination (proprietary domain): example.com/
htaccess Location: I installed the following in the directory of shoki2/, but none of them worked.
RewriteCond%{HTTP_HOST}^(abcd\.sakura\.ne.jp/shoki2/)(:80)?
RewriteRule^(.*)http://example.com/$1 [R=301,L]
RewriteEngine On
RewriteCon%{HTTP_HOST}^(www\.)?abcd\.sakura\.ne\.jp/shoki2/$[NC]
RewriteRule.*http://example.com/% {REQUEST_URI} [R=301,L]
I don't know how to write specific directories.
Thank you for your cooperation.
Thank you for your reply below.I was able to transfer it.
.htaccess
http://abcd.sakura.ne.jp/shoki2/hogehoge/
http://example.com/hogehoge/
Do you mean to redirect them as shown in ?
HTTP_HOST
does not have a path, so that RewriteCond does not match.
If you want to redirect to a particular directory, you might want to place .htaccess in that particular directory.
shoki2/ directory .htaccess
RewriteEngine on
RewriteCon%{HTTP_HOST}^abcd\.sakura\.ne\.jp(:80)?$
RewriteRule^(.*)$http://example.com/$1 [R=301,L]
If for some reason .htaccess cannot be placed in the shoki2/ directory, specify the directory name in RewriteRule.
Document Route .htaccess
RewriteEngine on
RewriteCon%{HTTP_HOST}^abcd\.sakura\.ne\.jp(:80)?$
RewriteRule^shoki2/(.*)$http://example.com/$1 [R=301,L]
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
910 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
571 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
572 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.