긴주소 줄이는 법좀 부탁드립니다. 정보
긴주소 줄이는 법좀 부탁드립니다.본문
미니필을 설치했구요
http://도메인.co.kr/minifeel/index.php?mb_id=demo
이런식으로 접속이 되는데요..
이걸 http://도메인.co.kr/demo 이렇게 줄이고 싶어요
알려주세요 ^^
http://도메인.co.kr/minifeel/index.php?mb_id=demo
이런식으로 접속이 되는데요..
이걸 http://도메인.co.kr/demo 이렇게 줄이고 싶어요
알려주세요 ^^
댓글 전체
방법은 아이디폴더 만들어주고
meta=refresh나 frame으로 띄우고 싶은 페이지를 연결하면됩니다.
/deme/index.php
index.php 내용---------
<html><head><title>demo 홈페이지</title></head>
<frameset rows="0*">
<frame name="a" src="http://도메인.co.kr/minifeel/index.php?mb_id=demo"> // 주소고정
</frameset></html>
---------------------------
그런데...
회원이 가입될 때 마다 수작업으로 한다는건 무리가 있겠네요
회원가입시
1. 회원폴더를 자동으로 만들고 index.php 파일을 생성해 주면 되지 않을까요 또는
2. 미니홈피 만들기 버튼 만들고 클릭시 홈생성파일 인클루드시켜 주거나
<?
$mini_home_path = $g4[path]."/$mb_id";
@mkdir($mini_home_path, 0707);
@chmod($mini_home_path, 0606);
//아래처럼 index.php 생성후 해당경로로 이동시켜 버리면 될 듯 합니다.
$file = "index..php";
$file2 = @fopen($file, "w");
fwrite($file2, "<html><head><title>$mb_id 홈페이지</title></head>
<frameset rows=0*><frame name=a src='http://도메인.co.kr/minifeel/index.php?mb_id=<?$mb_id?>'></frameset></html> ");
copy ("/home/mini_test/index.php","/home/$wr_id/index.php")
?>
회원탈퇴시에는 폴더삭제루틴을 넣어 줘야겠네요
소스 활용하시려면 해당 환경에 맞게 고쳐서 하세요...테스트 된 소스 아닙니다..
meta=refresh나 frame으로 띄우고 싶은 페이지를 연결하면됩니다.
/deme/index.php
index.php 내용---------
<html><head><title>demo 홈페이지</title></head>
<frameset rows="0*">
<frame name="a" src="http://도메인.co.kr/minifeel/index.php?mb_id=demo"> // 주소고정
</frameset></html>
---------------------------
그런데...
회원이 가입될 때 마다 수작업으로 한다는건 무리가 있겠네요
회원가입시
1. 회원폴더를 자동으로 만들고 index.php 파일을 생성해 주면 되지 않을까요 또는
2. 미니홈피 만들기 버튼 만들고 클릭시 홈생성파일 인클루드시켜 주거나
<?
$mini_home_path = $g4[path]."/$mb_id";
@mkdir($mini_home_path, 0707);
@chmod($mini_home_path, 0606);
//아래처럼 index.php 생성후 해당경로로 이동시켜 버리면 될 듯 합니다.
$file = "index..php";
$file2 = @fopen($file, "w");
fwrite($file2, "<html><head><title>$mb_id 홈페이지</title></head>
<frameset rows=0*><frame name=a src='http://도메인.co.kr/minifeel/index.php?mb_id=<?$mb_id?>'></frameset></html> ");
copy ("/home/mini_test/index.php","/home/$wr_id/index.php")
?>
회원탈퇴시에는 폴더삭제루틴을 넣어 줘야겠네요
소스 활용하시려면 해당 환경에 맞게 고쳐서 하세요...테스트 된 소스 아닙니다..
.htaccess 를 이용한 rewrite 을 하시면 됩니다.
메모장을 여신후 아래와 같이 작성하세요.
Options +FollowSymLinks
RewriteOptions MaxRedirects=3
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z]+)/?$ /minifeel/index.php?mb_id=$1 [L]
이 작성된 파일을 .htaccess 라는 이름으로 저장 하신 후, 서버 루트 디렉토리에 업로드를 해 주시면 됩니다.
그러면 http://도메인.co.kr/demo 으로 접속하시면
http://도메인.co.kr/minifeel/index.php?mb_id=demo
을 보여주게 됩니다.
메모장을 여신후 아래와 같이 작성하세요.
Options +FollowSymLinks
RewriteOptions MaxRedirects=3
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z]+)/?$ /minifeel/index.php?mb_id=$1 [L]
이 작성된 파일을 .htaccess 라는 이름으로 저장 하신 후, 서버 루트 디렉토리에 업로드를 해 주시면 됩니다.
그러면 http://도메인.co.kr/demo 으로 접속하시면
http://도메인.co.kr/minifeel/index.php?mb_id=demo
을 보여주게 됩니다.
아파치 RewriteRule의 기능을 잘 활용하면 효율적으로 관리할 수 있겠네요.. 스크랩
http://kin.naver.com/knowhow/entry.php?d1id=8&dir_id=8&eid=uI74ioAS+Hy4J5Qy8D4ViQyQceNzCEH1&qb=TWF4UmVkaXJlY3Rz&enc=utf8§ion=kin&rank=1&sort=0&spq=0&pid=fDHxSsoi5TlssZo3dMwsss--146187&sid=Sl5xVMJfXkoAAHg7QA0
홈페이지주소줄이기 크론용 php생성
http://kin.naver.com/knowhow/entry.php?d1id=8&dir_id=8&eid=uI74ioAS+Hy4J5Qy8D4ViQyQceNzCEH1&qb=TWF4UmVkaXJlY3Rz&enc=utf8§ion=kin&rank=1&sort=0&spq=0&pid=fDHxSsoi5TlssZo3dMwsss--146187&sid=Sl5xVMJfXkoAAHg7QA0
홈페이지주소줄이기 크론용 php생성