Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pretty url #31

Open
sapphire-sh opened this issue Mar 10, 2015 · 9 comments
Open

pretty url #31

sapphire-sh opened this issue Mar 10, 2015 · 9 comments

Comments

@sapphire-sh
Copy link

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

@angdev
Copy link
Member

angdev commented Mar 10, 2015

설명 좀 해주세요

@TintypeMolly
Copy link
Contributor

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

@angdev
Copy link
Member

angdev commented Mar 12, 2015

https://poolc.org/board?name=free
=> https://poolc.org/board/free

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

@TintypeMolly
Copy link
Contributor

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

@scarlet9
Copy link
Member

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

@TintypeMolly
Copy link
Contributor

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

@Perlmint
Copy link
Contributor

@TintypeMolly ㅋㅋㅋㅋㅋ

@Perlmint
Copy link
Contributor

@scarlet9 rewrite로 해결 가능함 ㅇㅇ

@scarlet9
Copy link
Member

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야 좋긴 한데 위에거 리다이렉트 걸어야 하는게 후지긴 하다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants