- A tutorial for getting rewrite rules (MyBB SEF style) work with lighttpd:
- https://community.mybboard.net/thread-51759.html
- The same method can be applied for Google SEO rewrite rules, but you
- have to create those rules manually. Google SEO can not detect that
- you are not using Apache, and will only generate .htaccess rules.
- Here is an example of what lighttpd rules for Google SEO look like:
- url.redirect:
- "^/MyBB/([^&?]*)&([^?]*)$" => "https://siteadı.com/MyBB/$1?$2",
- "^/MyBB/([^&?]*)&([^?]*)\?(.*)$" => "https://siteadı.com/MyBB/$1?$2&$3",
- url.rewrite:
- # Google SEO Sitemap:
- "^/MyBB/((?i)sitemap-([^./?]+)\.xml)(\?(.*)|)$" => "/MyBB/misc.php?google_seo_sitemap=$2&$4",
- # Google SEO URL Forums:
- "^/MyBB/((?i)Forum-([^./?]+))(\?(.*)|)$" => "/MyBB/forumdisplay.php?google_seo_forum=$2&$4",
- # Google SEO URL Threads:
- "^/MyBB/((?i)Thread-([^./?]+))(\?(.*)|)$" => "/MyBB/showthread.php?google_seo_thread=$2&$4",
- # Google SEO URL Announcements:
- "^/MyBB/((?i)Announcement-([^./?]+))(\?(.*)|)$" => "/MyBB/announcements.php?google_seo_announcement=$2&$4",
- # Google SEO URL Users:
- "^/MyBB/((?i)User-([^./?]+))(\?(.*)|)$" => "/MyBB/member.php?action=profile&google_seo_user=$2&$4",
- # Google SEO URL Calendars:
- "^/MyBB/((?i)Calendar-([^./?]+))(\?(.*)|)$" => "/MyBB/calendar.php?google_seo_calendar=$2&$4",
- # Google SEO URL Events:
- "^/MyBB/((?i)Event-([^./?]+))(\?(.*)|)$" => "/MyBB/calendar.php?action=event&google_seo_event=$2&$4",
- RewriteEngine on
- # Some hosts require RewriteBase to make RewriteRules work.
- RewriteBase /
- # Google SEO workaround for search.php highlights:
- # Make this rule the first rewrite rule in your .htaccess!
- RewriteRule ^([^&]*)&(.*)$ https://siteadı.com/$1?$2 [L,QSA,R=301]
- # Google SEO 404:
- ErrorDocument 404 /misc.php?google_seo_error=404
- # Google SEO Sitemap:
- RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
- # Google SEO URL Forums:
- RewriteRule ^forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
- # Google SEO URL Threads:
- RewriteRule ^konu\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
- # Google SEO URL Announcements:
- RewriteRule ^duyuru\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
- # Google SEO URL Users:
- RewriteRule ^uye\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
- # Google SEO URL Calendars:
- RewriteRule ^takvim\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
- # Google SEO URL Events:
- RewriteRule ^etkinlik\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
- # Google SEO URL Threads:
- RewriteRule ^konu\-([^./]+)\.html$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
- # Google SEO URL Announcements:
- RewriteRule ^duyuru\-([^./]+)\.html$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
- # Google SEO URL Users:
- RewriteRule ^uye\-([^./]+)\.html$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
- # Google SEO URL Calendars:
- RewriteRule ^takvim\-([^./]+)\.html$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
- # Google SEO URL Events:
- RewriteRule ^etkinlik\-([^./]+)\.html$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]
- # Google SEO Sitemap:
- RewriteRule ^sitemap\.xml$ misc.php? [L,QSA,NC]
- # Google SEO URL Forums:
- RewriteRule ^forum\-([^./]+)\.HTML$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
- RewriteCond %{HTTPS} !=on
- RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.+$
- RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/[0-9a-zA-Z_-]+$
- RewriteRule (.*) https://siteadı.com/$1 [R=301,L]
.htaccess