Skip to content

Commit

Permalink
fix: corrected rewrite routes
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Feb 9, 2024
1 parent db3f711 commit dcf7769
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ server {

if (!-f $request_filename) {
# General pages
rewrite ^/(showcat|search|addcontent|ask|open-questions|help|contact|glossary|overview|login|privacy|index).html$ /index.php?action=$1 last;
rewrite ^/addcontent.html$ /index.php?action=add last;
rewrite ^/show-categories.html$ /index.php?action=show last;
rewrite ^/(search|ask|open-questions|help|contact|glossary|overview|login|privacy|index).html$ /index.php?action=$1 last;

# a solution id page
rewrite ^/solution_id_([0-9]+).html$ /index.php?solution_id=$1 last;
Expand Down
4 changes: 3 additions & 1 deletion phpmyfaq/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ RewriteBase /
ErrorDocument 404 /index.php?action=404

# General pages
RewriteRule ^(show-categories|search|addcontent|ask|open-questions|contact|glossary|overview|login|privacy)\.html$ index.php?action=$1 [L,QSA]
RewriteRule addcontent.html$ index.php?action=add [L,QSA]
RewriteRule show-categories.html$ index.php?action=show [L,QSA]
RewriteRule ^(search|ask|open-questions|contact|glossary|overview|login|privacy)\.html$ index.php?action=$1 [L,QSA]

# start page
RewriteRule ^index.html$ index.php [PT]
Expand Down

0 comments on commit dcf7769

Please sign in to comment.