1. A tutorial for getting rewrite rules (MyBB SEF style) work with lighttpd:
  2. https://community.mybboard.net/thread-51759.html
  3. The same method can be applied for Google SEO rewrite rules, but you
  4. have to create those rules manually. Google SEO can not detect that
  5. you are not using Apache, and will only generate .htaccess rules.
  6. Here is an example of what lighttpd rules for Google SEO look like:
  7. url.redirect:
  8. "^/MyBB/([^&?]*)&([^?]*)$" => "https://siteadı.com/MyBB/$1?$2",
  9. "^/MyBB/([^&?]*)&([^?]*)\?(.*)$" => "https://siteadı.com/MyBB/$1?$2&$3",
  10. url.rewrite:
  11. # Google SEO Sitemap:
  12. "^/MyBB/((?i)sitemap-([^./?]+)\.xml)(\?(.*)|)$" => "/MyBB/misc.php?google_seo_sitemap=$2&$4",
  13. # Google SEO URL Forums:
  14. "^/MyBB/((?i)Forum-([^./?]+))(\?(.*)|)$" => "/MyBB/forumdisplay.php?google_seo_forum=$2&$4",
  15. # Google SEO URL Threads:
  16. "^/MyBB/((?i)Thread-([^./?]+))(\?(.*)|)$" => "/MyBB/showthread.php?google_seo_thread=$2&$4",
  17. # Google SEO URL Announcements:
  18. "^/MyBB/((?i)Announcement-([^./?]+))(\?(.*)|)$" => "/MyBB/announcements.php?google_seo_announcement=$2&$4",
  19. # Google SEO URL Users:
  20. "^/MyBB/((?i)User-([^./?]+))(\?(.*)|)$" => "/MyBB/member.php?action=profile&google_seo_user=$2&$4",
  21. # Google SEO URL Calendars:
  22. "^/MyBB/((?i)Calendar-([^./?]+))(\?(.*)|)$" => "/MyBB/calendar.php?google_seo_calendar=$2&$4",
  23. # Google SEO URL Events:
  24. "^/MyBB/((?i)Event-([^./?]+))(\?(.*)|)$" => "/MyBB/calendar.php?action=event&google_seo_event=$2&$4",
  25. RewriteEngine on
  26. # Some hosts require RewriteBase to make RewriteRules work.
  27. RewriteBase /
  28. # Google SEO workaround for search.php highlights:
  29. # Make this rule the first rewrite rule in your .htaccess!
  30. RewriteRule ^([^&]*)&(.*)$ https://siteadı.com/$1?$2 [L,QSA,R=301]
  31. # Google SEO 404:
  32. ErrorDocument 404 /misc.php?google_seo_error=404
  33. # Google SEO Sitemap:
  34. RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
  35. # Google SEO URL Forums:
  36. RewriteRule ^forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
  37. # Google SEO URL Threads:
  38. RewriteRule ^konu\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
  39. # Google SEO URL Announcements:
  40. RewriteRule ^duyuru\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
  41. # Google SEO URL Users:
  42. RewriteRule ^uye\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
  43. # Google SEO URL Calendars:
  44. RewriteRule ^takvim\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
  45. # Google SEO URL Events:
  46. RewriteRule ^etkinlik\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
  47. # Google SEO URL Threads:
  48. RewriteRule ^konu\-([^./]+)\.html$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
  49. # Google SEO URL Announcements:
  50. RewriteRule ^duyuru\-([^./]+)\.html$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
  51. # Google SEO URL Users:
  52. RewriteRule ^uye\-([^./]+)\.html$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
  53. # Google SEO URL Calendars:
  54. RewriteRule ^takvim\-([^./]+)\.html$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
  55. # Google SEO URL Events:
  56. RewriteRule ^etkinlik\-([^./]+)\.html$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
  57. # Google SEO Sitemap:
  58. RewriteRule ^sitemap\.xml$ misc.php? [L,QSA,NC]
  59. # Google SEO URL Forums:
  60. RewriteRule ^forum\-([^./]+)\.HTML$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
  61. RewriteCond %{HTTPS} !=on
  62. RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.+$
  63. RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/[0-9a-zA-Z_-]+$
  64. RewriteRule (.*) https://siteadı.com/$1 [R=301,L]

.htaccess