폴더 Not Found 뜨고, 뒤에 index.php 붙여야 페이지가 떠요
본문
http://www.도메인.co.kr/cafe/date/ 접속 시,
------
Not Found
The requested URL /cafe/date/happy.html was not found on this server.
Microsoft-IIS/5.0 Server at www.도메인.co.kr Port 80
------
라고 떠요..
http://www.도메인.co.kr/cafe/date/index.php 이 페이지로 들어가면 정상 페이지 뜨고요.
문제는 포털에 www.도메인.co.kr/cafe/date/ 이 url 경로 문서가 상위노출되어있어요...
http://www.도메인.co.kr/cafe/date/ 접속 시 타 페이지로 meta 리다이렉트 하면 seo에 안좋잔아요..
The requested URL /cafe/date/happy.html was not found on this server. 이게 힌트인가요?? happy.html을 살려야하나요?
이럴경우에는 www.도메인.co.kr/cafe/date/ 페이지를 301 영구 리다이렉트 처리해서 http://www.도메인.co.kr/cafe/date/index.php 으로 보내주면 되나요???
seo 고려해서 조언좀 해주시면 안될까요?ㅠㅠ
답변 2
IIS 기본 문서 설정에서 index.php를 추가하여 /cafe/date/에 접속 시
자동으로 실행되도록 설정하는 것이 가장 간단하고 효과적인 방법.
만약 기본 문서 설정이 적용되지 않거나 강제적인 리다이렉트가 필요하다면,
web.config를 이용해 /cafe/date/ 요청을 /cafe/date/index.php로 301 영구 리다이렉트하여
SEO 최적화를 유지하는 것이 최적의 해결책.
*IIS 기본 문서 설정 (권장)
- IIS 관리자 실행 (윈도우 + R → inetmgr 입력 후 실행)
- 해당 사이트 선택 (www.도메인.co.kr)
- "기본 문서(Default Document)" 설정 이동
- index.php가 리스트에 없으면 추가
- IIS 재시작(Nginx)
iisreset
>>적용 후 /cafe/date/로 접속하면 index.php 실행됨.
*web.config 301 리다이렉트 설정 (필요 시 적용)
- /cafe/date/web.config 파일 생성 또는 수정
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to index.php" stopProcessing="true">
<match url="^$" />
<action type="Redirect" url="index.php" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
>>/cafe/date/에 접속하면 /cafe/date/index.php로 301 리다이렉트됨 (SEO 친화적)
말 그대로에요
The requested URL /cafe/date/happy.html was not found on this server.
서버설정에서 초기 진입 파일을 happy.html 로 해놓으신것 같습니다.
서버에 따라 다르지만 통상 nginx 의 경우
server {
listen 80;
server_name 도메인.com;
root /var/www/html;
index index.php index.html index.htm;
# 기타 설정
}
이렇게 인덱싱 하는 경우도 있거든요
/etc/nginx/nginx.conf 채크해보세요.