웹어플리케이션서버2021. 11. 5. 14:43

^/(정규식1)(정규식2)$

$1: 정규식1

$2: 정규식2 

정규식 순서에 따라 순차적으로 매칭되는 변수 $숫자

# domain.com 으로 접속 시 newdomain.com 으로 리다이렉토

server {

  server_name   domain.com;

  return 301 http://www.newdomain.com$request_uri;

}

# domain.com/change/view.php?no=1000 으로 접속 시 domain.com/changed/article.php?art_no=1000 으로 변환

server {

  server_name   domain.com;

location ~* ^/change/(.*)$ {
     rewrite ^/change/(.*)$ http://domain.com/changed/$1 permanent; 
     break;
}

 

# domain.com/~~~ 으로 접속 시 newdomain.com/~~~ 으로 변환

server {

  server_name   domain.com;

location ~* ^(.*)$ {
     rewrite ^(.*)$ http://www.newdomain.com$1 permanent;
     break;
}

 

# domain.com/aaa.html 혹은 domain.com/bbb.html 으로 접속 시 domain.com/chage.html 으로 변환

server {

  server_name domain.com;

location ~* ^(.*)$ {

     rewrite ^/aaa.html$ /chage.html permanent;
     rewrite ^/bbb.html$ /chage.html permanent;
     break;

}

 

Posted by 미랭군
Vue.js2021. 8. 18. 10:17

가끔씩 VUE객체에 접근해서 보고 싶을 때 아래와 같이 사용하면 된다.

var myVue1 = document.getElementById("myVueId").__vue__;
var myVue2 = document.getElementsByClassName("myVueClass")[0].__vue__;

 

Posted by 미랭군
웹개발2021. 6. 3. 13:45

이클립스에선 디폴트로 체크되어 있어서 기본 기능인 줄 알았는데 STS에선 안되서 찾아보니

이 버튼의 기능이였다니..

Project Explorer > Link with Editor 활성화

Posted by 미랭군