1
를 htaccess로 사용하여 URL의 일부를 교체 example.com
을 내 IP (1.1.10.7
)에 넣으면 사용자가 auth
을 포함하는 경로에 액세스합니다. 내가 필요로하는내가이 같은 경우가
결과는 다음과 같습니다
http://example.com/
=>http://example.com/
http://example.com/test/
=>http://example.com/test/
http://example.com/auth/
=>http://1.1.10.7/auth/
http://example.com/auth/login
=>http://1.1.10.7/auth/login
http://example.com/auth/forget_password
=>http://1.1.10.7/auth/forget_password
다른 StackOverflow 질문을 읽는 중 여러 번 시도했지만 여전히 해결되지 않았습니다.
아무도 도와 줄 수 있습니까?
당신은 같은 것을 시도 할 수 있습니다 - RedirectMatch에'301 ^/인증 /(.*) http://1.1.10.7/auth/$1를 ' –
@Kunal : 리디렉션 루프가 생깁니다 – anubhava
@anubhava 오, 그래, 그 부분을 놓쳤습니다. –