Skip to content

Commit

Permalink
Add htaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
crunchyintheory committed May 26, 2024
1 parent a826aa9 commit 2de5b57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: GitHub Pages
name: SFTP Deploy
on:
push:
branches: [master]
Expand Down Expand Up @@ -30,6 +30,7 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- run: cp ./.htaccess ./dist/.htaccess
- name: Deploy to Server
id: deployment
uses: wlixcc/SFTP-Deploy-Action@v1.2.4
Expand Down
10 changes: 10 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html [QSA,L]
</ifModule>

<If "%{THE_REQUEST} =~ m#/create#">
Header Set Link '<https://poeitem.crunchyintheory.com>; rel="canonical"'
</If>

0 comments on commit 2de5b57

Please sign in to comment.