Razor Pages 경로 최적화: 절대 경로 → 상대 경로
## 변경사항
- Login.cshtml.cs: /taxbaik/* 절대 경로 제거
- RedirectUrl: '/taxbaik/admin/dashboard' → '/admin/dashboard'
- NormalizeRedirectUrl: 경로 정규화 로직 간소화
- 모든 Razor Pages (.cshtml):
- href='/taxbaik/*' → href='/*' 변경
- src='/taxbaik/*' → src='/*' 변경
- Response.Redirect('/taxbaik/*') → Response.Redirect('/*') 변경
- Feed.cshtml: RSS 피드의 절대 URL 유지 (SEO용)
## 원칙
✅ 내부 링크: 상대 경로 사용
✅ 외부 URL (RSS, CanonicalUrl): 절대 URL 유지
✅ Nginx: /taxbaik 프리픽스 자동 처리
## 결과
✅ 빌드: 0 오류, 2 경고
✅ 전체 경로 최적화 완료
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
|
||||
<!-- Category Tabs -->
|
||||
<div class="mb-4 d-flex flex-wrap gap-2">
|
||||
<a href="/taxbaik/blog" class="btn btn-sm @(Model.SelectedCategoryId == null ? "btn-primary" : "btn-outline-primary")">전체</a>
|
||||
<a href="/blog" class="btn btn-sm @(Model.SelectedCategoryId == null ? "btn-primary" : "btn-outline-primary")">전체</a>
|
||||
@foreach (var cat in Model.Categories)
|
||||
{
|
||||
<a href="/taxbaik/blog?categoryId=@cat.Id" class="btn btn-sm @(Model.SelectedCategoryId == cat.Id ? "btn-primary" : "btn-outline-primary")">@cat.Name</a>
|
||||
<a href="/blog?categoryId=@cat.Id" class="btn btn-sm @(Model.SelectedCategoryId == cat.Id ? "btn-primary" : "btn-outline-primary")">@cat.Name</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<small class="badge bg-primary">@post.CategoryName</small>
|
||||
<h5 class="card-title mt-2">@post.Title</h5>
|
||||
<p class="card-text small">@post.CreatedAt.ToString("yyyy-MM-dd")</p>
|
||||
<a href="/taxbaik/blog/@post.Slug" class="btn btn-sm btn-primary">글 내용 보기</a>
|
||||
<a href="/blog/@post.Slug" class="btn btn-sm btn-primary">글 내용 보기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,19 +39,19 @@
|
||||
@if (Model.CurrentPage > 1)
|
||||
{
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/taxbaik/blog?page=@(Model.CurrentPage - 1)">이전</a>
|
||||
<a class="page-link" href="/blog?page=@(Model.CurrentPage - 1)">이전</a>
|
||||
</li>
|
||||
}
|
||||
@for (int i = 1; i <= Model.TotalPages; i++)
|
||||
{
|
||||
<li class="page-item @(i == Model.CurrentPage ? "active" : "")">
|
||||
<a class="page-link" href="/taxbaik/blog?page=@i">@i</a>
|
||||
<a class="page-link" href="/blog?page=@i">@i</a>
|
||||
</li>
|
||||
}
|
||||
@if (Model.CurrentPage < Model.TotalPages)
|
||||
{
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/taxbaik/blog?page=@(Model.CurrentPage + 1)">다음</a>
|
||||
<a class="page-link" href="/blog?page=@(Model.CurrentPage + 1)">다음</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user