0
내 요구 사항은 모바일 또는 PC 용 아파치
- 검사에서 복잡한 htaccess로 파일을 작성하고 URL을 수정 리디렉션합니다. 사용자가 일부 내부 페이지로 바로 오는 경우
- , 그는 해당 페이지 만에 있어야합니다.
- 올드 리디렉션도 작동합니다.
요청 첫째는 문서 루트가 모바일 웹 사이트 인 아파치 서버에 온다. 내가 위의 모든 일을 할 필요가 어디 그래서 여기 내가 htaccess로 파일이 있습니다. 그리고 이것은 지금까지 제가 쓴 것입니다. 모든 리디렉션이 제대로 작동하지 않습니다.
<IfModule mod_rewrite.c>
RewriteEngine on
/** Pc site settings **/
RewriteCond %{HTTP_USER_AGENT} "!{android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile}" [NC]
RewriteRule ^/abc/def/abc.html$ #http://www.pcsite.com/a/abc/abc.html [R=301,L]
RewriteRule ^(.*)$ http://www.pcsite.com/$1 [L,R=301]
/** Pc site settings - end**/
/** mobile site settings **/
RewriteRule web.config - [F,L]
RewriteRule ^(.*)(device/[^/]+/)(min/.*)$ $1$3?_device=$2 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=min/.*$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^(.*)$ index.php?_path=%1 [L,QSA]
/** mobile site settings - End**/
</IfModule>
그래 내가 아파치를 다시 시작했다. 하지만 여전히 이것은 .htacess 파일의 변경 사항입니다. – Hacker