PoolC / Yuzuki

PoolC 홈페이지 제작 프로젝트
https://poolc.org/
MIT License
10 stars 9 forks source link

pretty url #31

Open sapphire-sh opened 9 years ago

sapphire-sh commented 9 years ago

https://poolc.org/article/view?id=98 => https://poolc.org/article/view/98

angdev commented 9 years ago

설명 좀 해주세요

TintypeMolly commented 9 years ago

Article에 대해서만 하면 되나? 그리고 이슈 댓글은 수정하지 말고 추가로 달아라.

angdev commented 9 years ago
https://poolc.org/board?name=free
=> https://poolc.org/board/free

같은 것도 있을 수는 있네요.

TintypeMolly commented 9 years ago

근데 board를 링크걸어서 참조하게 할 일은 없을 것 같음. @FeGs

scarlet9 commented 8 years ago

이거 그냥 nginx 단에서 처리하면 안 되나...?

TintypeMolly commented 8 years ago

twisted같은 개헛짓 안하고 flask로 했었으면 금방 해결될 일이었을텐데

Perlmint commented 8 years ago

@TintypeMolly ㅋㅋㅋㅋㅋ

Perlmint commented 8 years ago

@scarlet9 rewrite로 해결 가능함 ㅇㅇ

scarlet9 commented 8 years ago
location = /article/view {
    if ($arg_id != "\d+") { return 400; }
    rewrite ^.+$ /article/view/$arg_id redirect;
}
location ~* ^/article/view/\d+$ {
  rewrite ^/article/view/(\d+)$ /article/view?id=$1 break;
  // uwsgi_pass or proxy_pass or whatever.
}

그냥 대충 생각나는대로 쳐서 안 될듯. 근데 아래거 rewrite야 좋긴 한데 위에거 리다이렉트 걸어야 하는게 후지긴 하다.