0
다음 .htaccess 코드를 사용 중입니다. 루트 폴더에서브 디렉토리에 htaccess www가 아닌 www가 작동하지 않음
이htaccess로는
#for redirecting www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]
#temporary redirect root to dir/
RedirectMatch ^/$ /dir/
현재 코드 www.domain.com으로 디렉토리 폴더
RewriteEngine on
#for changing index file to a custom one
DirectoryIndex abc.php?tag=ho
#for simple url
RewriteRule ^what/([^/]*)\.html$ /dir/abc.php?tag=$1 [L]
에서 htaccess로는 domain.com하지만 www.domain.com/dir/로 리디렉션 리디렉션하지 않습니다.
- 리디렉션 WWW :
나는 두 가지를 수정해야합니다.
+1 mod_alias와 mod_rewrite를 섞지 않는 것이 좋습니다. – anubhava