# Redirect non-www to www

# Specific redirections
if ($args ~* ^isref=cFEU2M$){ rewrite ^/$ /isref-cFEU2M? permanent; }
if ($args ~* ^ref=05kYbB$){ rewrite ^/$ /ref-05kYbB? permanent; }
if ($args ~* ^ref=0mOplQ$){ rewrite ^/$ /ref-0mOplQ? permanent; }
if ($args ~* ^ref=1aG17f$){ rewrite ^/$ /ref-1aG17f? permanent; }
if ($args ~* ^ref=1bzSZp$){ rewrite ^/$ /ref-1bzSZp? permanent; }
if ($args ~* ^ref=1XW44n$){ rewrite ^/$ /ref-1XW44n? permanent; }
if ($args ~* ^ref=33KakU$){ rewrite ^/$ /ref-33KakU? permanent; }
if ($args ~* ^ref=3c9pcE$){ rewrite ^/$ /ref-3c9pcE? permanent; }
if ($args ~* ^ref=3NdmxG$){ rewrite ^/$ /ref-3NdmxG? permanent; }
if ($args ~* ^ref=3R6RqM$){ rewrite ^/$ /ref-3R6RqM? permanent; }
if ($args ~* ^ref=3Se4sb$){ rewrite ^/$ /ref-3Se4sb? permanent; }
if ($args ~* ^ref=4PtGj1$){ rewrite ^/$ /ref-4PtGj1? permanent; }
if ($args ~* ^ref=623d85$){ rewrite ^/$ /ref-623d85? permanent; }
if ($args ~* ^ref=6dxW2x$){ rewrite ^/$ /ref-6dxW2x? permanent; }
if ($args ~* ^ref=6HR4oV$){ rewrite ^/$ /ref-6HR4oV? permanent; }
if ($args ~* ^ref=78RlNG$){ rewrite ^/$ /ref-78RlNG? permanent; }
if ($args ~* ^ref=7ZtzuR$){ rewrite ^/$ /ref-7ZtzuR? permanent; }
if ($args ~* ^ref=80HiMQ$){ rewrite ^/$ /ref-80HiMQ? permanent; }
if ($args ~* ^ref=8wveIQ$){ rewrite ^/$ /ref-8wveIQ? permanent; }
if ($args ~* ^ref=9WMy2I$){ rewrite ^/$ /ref-9WMy2I? permanent; }
if ($args ~* ^ref=ai4\.tools$){ rewrite ^/$ /ref-ai4? permanent; }
if ($args ~* ^ref=aiPromptly$){ rewrite ^/$ /ref-aiPromptly? permanent; }
if ($args ~* ^ref=AjShPB$){ rewrite ^/$ /ref-AjShPB? permanent; }
if ($args ~* ^ref=APQsDF$){ rewrite ^/$ /ref-APQsDF? permanent; }
if ($args ~* ^ref=aWwanb$){ rewrite ^/$ /ref-aWwanb? permanent; }
if ($args ~* ^ref=B1pcBc$){ rewrite ^/$ /ref-B1pcBc? permanent; }
if ($args ~* ^ref=b6nrLG$){ rewrite ^/$ /ref-b6nrLG? permanent; }
if ($args ~* ^ref=bookspotz\.com$){ rewrite ^/$ /ref-bookspotz? permanent; }
if ($args ~* ^ref=BOVhfg$){ rewrite ^/$ /ref-BOVhfg? permanent; }
if ($args ~* ^ref=bZwDj2$){ rewrite ^/$ /ref-bZwDj2? permanent; }
if ($args ~* ^ref=cJiC9R$){ rewrite ^/$ /ref-cJiC9R? permanent; }
if ($args ~* ^ref=CN2T6l$){ rewrite ^/$ /ref-CN2T6l? permanent; }
if ($args ~* ^ref=CnSQhL$){ rewrite ^/$ /ref-CnSQhL? permanent; }
if ($args ~* ^ref=d0HBoa$){ rewrite ^/$ /ref-d0HBoa? permanent; }
if ($args ~* ^ref=dangai$){ rewrite ^/$ /ref-dangai? permanent; }
if ($args ~* ^ref=dgpAVN$){ rewrite ^/$ /ref-dgpAVN? permanent; }
if ($args ~* ^ref=DN5GI6$){ rewrite ^/$ /ref-DN5GI6? permanent; }
if ($args ~* ^ref=dOjEV2$){ rewrite ^/$ /ref-dOjEV2? permanent; }
if ($args ~* ^ref=DZ1wxP$){ rewrite ^/$ /ref-DZ1wxP? permanent; }
if ($args ~* ^ref=e1P3aa$){ rewrite ^/$ /ref-e1P3aa? permanent; }
if ($args ~* ^ref=EBRCLo$){ rewrite ^/$ /ref-EBRCLo? permanent; }
if ($args ~* ^ref=EElecj$){ rewrite ^/$ /ref-EElecj? permanent; }
if ($args ~* ^ref=Ek2755$){ rewrite ^/$ /ref-Ek2755? permanent; }
if ($args ~* ^ref=Eq7yiV$){ rewrite ^/$ /ref-Eq7yiV? permanent; }
if ($args ~* ^ref=erWQtd$){ rewrite ^/$ /ref-erWQtd? permanent; }
if ($args ~* ^ref=FEIURL$){ rewrite ^/$ /ref-FEIURL? permanent; }
if ($args ~* ^ref=G98XzE$){ rewrite ^/$ /ref-G98XzE? permanent; }
if ($args ~* ^ref=GD8sYj$){ rewrite ^/$ /ref-GD8sYj? permanent; }
if ($args ~* ^ref=gqc6A7$){ rewrite ^/$ /ref-gqc6A7? permanent; }
if ($args ~* ^ref=H6yjCX$){ rewrite ^/$ /ref-H6yjCX? permanent; }
if ($args ~* ^ref=Hsypll$){ rewrite ^/$ /ref-Hsypll? permanent; }
if ($args ~* ^ref=I0Es27$){ rewrite ^/$ /ref-I0Es27? permanent; }
if ($args ~* ^ref=i0eSC$){ rewrite ^/$ /ref-i0eSC? permanent; }
if ($args ~* ^ref=i2aTSC$){ rewrite ^/$ /ref-i2aTSC? permanent; }
if ($args ~* ^ref=ICZqmZ$){ rewrite ^/$ /ref-ICZqmZ? permanent; }
if ($args ~* ^ref=iLrqRf$){ rewrite ^/$ /ref-iLrqRf? permanent; }
if ($args ~* ^ref=INSF0E$){ rewrite ^/$ /ref-INSF0E? permanent; }
if ($args ~* ^ref=IXUdN7$){ rewrite ^/$ /ref-IXUdN7? permanent; }
if ($args ~* ^ref=j9z86v$){ rewrite ^/$ /ref-j9z86v? permanent; }
if ($args ~* ^ref=JfgSmF$){ rewrite ^/$ /ref-JfgSmF? permanent; }
if ($args ~* ^ref=jMhvk9$){ rewrite ^/$ /ref-jMhvk9? permanent; }
if ($args ~* ^ref=JQ8AXc$){ rewrite ^/$ /ref-JQ8AXc? permanent; }
if ($args ~* ^ref=jWsMgC$){ rewrite ^/$ /ref-jWsMgC? permanent; }
if ($args ~* ^ref=K0x4C3$){ rewrite ^/$ /ref-K0x4C3? permanent; }
if ($args ~* ^ref=KizU5H$){ rewrite ^/$ /ref-KizU5H? permanent; }
if ($args ~* ^ref=KLxYfT$){ rewrite ^/$ /ref-KLxYfT? permanent; }
if ($args ~* ^ref=kRKOYu$){ rewrite ^/$ /ref-kRKOYu? permanent; }
if ($args ~* ^ref=kUgMNC$){ rewrite ^/$ /ref-kUgMNC? permanent; }
if ($args ~* ^ref=KylG9O$){ rewrite ^/$ /ref-KylG9O? permanent; }
if ($args ~* ^ref=lkCHxY$){ rewrite ^/$ /ref-lkCHxY? permanent; }
if ($args ~* ^ref=lookaitools$){ rewrite ^/$ /ref-lookaitools? permanent; }
if ($args ~* ^ref=LqMu5w$){ rewrite ^/$ /ref-LqMu5w? permanent; }
if ($args ~* ^ref=lTvBtD$){ rewrite ^/$ /ref-lTvBtD? permanent; }
if ($args ~* ^ref=LumumC$){ rewrite ^/$ /ref-LumumC? permanent; }
if ($args ~* ^ref=MKaOlh$){ rewrite ^/$ /ref-MKaOlh? permanent; }
if ($args ~* ^ref=MlrbGN$){ rewrite ^/$ /ref-MlrbGN? permanent; }
if ($args ~* ^ref=O0IPl9$){ rewrite ^/$ /ref-O0IPl9? permanent; }
if ($args ~* ^ref=o2v9SB$){ rewrite ^/$ /ref-o2v9SB? permanent; }
if ($args ~* ^ref=o4viL2$){ rewrite ^/$ /ref-o4viL2? permanent; }
if ($args ~* ^ref=o7tPhn$){ rewrite ^/$ /ref-o7tPhn? permanent; }
if ($args ~* ^ref=OdrK8i$){ rewrite ^/$ /ref-OdrK8i? permanent; }
if ($args ~* ^ref=oIPWOI$){ rewrite ^/$ /ref-oIPWOI? permanent; }
if ($args ~* ^ref=OKM6J4$){ rewrite ^/$ /ref-OKM6J4? permanent; }
if ($args ~* ^ref=OLeB5J$){ rewrite ^/$ /ref-OLeB5J? permanent; }
if ($args ~* ^ref=oXODjp$){ rewrite ^/$ /ref-oXODjp? permanent; }
if ($args ~* ^ref=P02Lfs$){ rewrite ^/$ /ref-P02Lfs? permanent; }
if ($args ~* ^ref=Pa8j7X$){ rewrite ^/$ /ref-Pa8j7X? permanent; }
if ($args ~* ^ref=Pkcd8d$){ rewrite ^/$ /ref-Pkcd8d? permanent; }
if ($args ~* ^ref=producthunt$){ rewrite ^/$ /ref-producthunt? permanent; }
if ($args ~* ^ref=PRp0SD$){ rewrite ^/$ /ref-PRp0SD? permanent; }
if ($args ~* ^ref=Pt7pry$){ rewrite ^/$ /ref-Pt7pry? permanent; }
if ($args ~* ^ref=pywMlb$){ rewrite ^/$ /ref-pywMlb? permanent; }
if ($args ~* ^ref=q9GON0$){ rewrite ^/$ /ref-q9GON0? permanent; }
if ($args ~* ^ref=qjpWsQ$){ rewrite ^/$ /ref-qjpWsQ? permanent; }
if ($args ~* ^ref=QkitZ5$){ rewrite ^/$ /ref-QkitZ5? permanent; }
if ($args ~* ^ref=rADSkW$){ rewrite ^/$ /ref-rADSkW? permanent; }
if ($args ~* ^ref=rQTJfw$){ rewrite ^/$ /ref-rQTJfw? permanent; }
if ($args ~* ^ref=S21I1E$){ rewrite ^/$ /ref-S21I1E? permanent; }
if ($args ~* ^ref=sdwpFT$){ rewrite ^/$ /ref-sdwpFT? permanent; }
if ($args ~* ^ref=sFIadk$){ rewrite ^/$ /ref-sFIadk? permanent; }
if ($args ~* ^ref=sgSzY3$){ rewrite ^/$ /ref-sgSzY3? permanent; }
if ($args ~* ^ref=SKlDUl$){ rewrite ^/$ /ref-SKlDUl? permanent; }
if ($args ~* ^ref=SKrOkK$){ rewrite ^/$ /ref-SKrOkK? permanent; }
if ($args ~* ^ref=Sp3F3K$){ rewrite ^/$ /ref-Sp3F3K? permanent; }
if ($args ~* ^ref=sZiQox$){ rewrite ^/$ /ref-sZiQox? permanent; }
if ($args ~* ^ref=TDQgMu$){ rewrite ^/$ /ref-TDQgMu? permanent; }
if ($args ~* ^ref=theresanaiforthat$){ rewrite ^/$ /ref-theresanaiforthat? permanent; }
if ($args ~* ^ref=topspotai$){ rewrite ^/$ /ref-topspotai? permanent; }
if ($args ~* ^ref=TvBesa$){ rewrite ^/$ /ref-TvBesa? permanent; }
if ($args ~* ^ref=V1sb2O$){ rewrite ^/$ /ref-V1sb2O? permanent; }
if ($args ~* ^ref=VFp2Ia$){ rewrite ^/$ /ref-VFp2Ia? permanent; }
if ($args ~* ^ref=vLaIhz$){ rewrite ^/$ /ref-vLaIhz? permanent; }
if ($args ~* ^ref=Vo8CGP$){ rewrite ^/$ /ref-Vo8CGP? permanent; }
if ($args ~* ^ref=VpmKfr$){ rewrite ^/$ /ref-VpmKfr? permanent; }
if ($args ~* ^ref=vwuggq$){ rewrite ^/$ /ref-vwuggq? permanent; }
if ($args ~* ^ref=Wac0YC$){ rewrite ^/$ /ref-Wac0YC? permanent; }
if ($args ~* ^ref=waildworld\.com$){ rewrite ^/$ /ref-waildworld? permanent; }
if ($args ~* ^ref=woF9Vk$){ rewrite ^/$ /ref-woF9Vk? permanent; }
if ($args ~* ^ref=WUSwJh$){ rewrite ^/$ /ref-WUSwJh? permanent; }
if ($args ~* ^ref=WYgU0x$){ rewrite ^/$ /ref-WYgU0x? permanent; }
if ($args ~* ^ref=wZ6p4j$){ rewrite ^/$ /ref-wZ6p4j? permanent; }
if ($args ~* ^ref=xbxbgz$){ rewrite ^/$ /ref-xbxbgz? permanent; }
if ($args ~* ^ref=XCqlzh$){ rewrite ^/$ /ref-XCqlzh? permanent; }
if ($args ~* ^ref=xnU46g$){ rewrite ^/$ /ref-xnU46g? permanent; }
if ($args ~* ^ref=xO8d2f$){ rewrite ^/$ /ref-xO8d2f? permanent; }
if ($args ~* ^ref=y1Fyde$){ rewrite ^/$ /ref-y1Fyde? permanent; }
if ($args ~* ^ref=Yco0Hp$){ rewrite ^/$ /ref-Yco0Hp? permanent; }
if ($args ~* ^ref=YEF57O$){ rewrite ^/$ /ref-YEF57O? permanent; }
if ($args ~* ^ref=yGPmRB$){ rewrite ^/$ /ref-yGPmRB? permanent; }
if ($args ~* ^ref=YqusXd$){ rewrite ^/$ /ref-YqusXd? permanent; }
if ($args ~* ^ref=zHaL0r$){ rewrite ^/$ /ref-zHaL0r? permanent; }
if ($args ~* ^ref=zk2l7V$){ rewrite ^/$ /ref-zk2l7V? permanent; }
if ($args ~* ^ref=ZLO9lB$){ rewrite ^/$ /ref-ZLO9lB? permanent; }
if ($args ~* ^ref=ZSo5CV$){ rewrite ^/$ /ref-ZSo5CV? permanent; }
if ($args ~* ^utm-source=ai-centralhub$){ rewrite ^/$ /utm-source-ai-centralhub? permanent; }
if ($args ~* ^via=topaitools$){ rewrite ^/$ /via-topaitools? permanent; }
if ($args ~* ^url=\%2F_next\%2Fstatic\%2Fmedia\%2Ftrellis-logomark\.015b6812\.png&w=48&q=75$){ rewrite ^/_next/image$ /_next/image_url-_next_static_media_trellis-logomark_015b6812_png-w-48-q-75? permanent; }
if ($args ~* ^id=31dcd88b-3330-46c8-b4cb-a16fff034315$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-31dcd88b-3330-46c8-b4cb-a16fff034315? permanent; }
if ($args ~* ^id=364698cb-343c-43ed-8a4a-1e4cb76e764c$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-364698cb-343c-43ed-8a4a-1e4cb76e764c? permanent; }
if ($args ~* ^id=5553e53d-4e99-4fa8-b0f0-a833f9a0c71c$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-5553e53d-4e99-4fa8-b0f0-a833f9a0c71c? permanent; }
if ($args ~* ^id=8bba164a-1f06-4c35-9f95-95ecab35afee$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-8bba164a-1f06-4c35-9f95-95ecab35afee? permanent; }
if ($args ~* ^id=94bc8b1a-95cb-4c02-8cf5-fb1b271c1695$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-94bc8b1a-95cb-4c02-8cf5-fb1b271c1695? permanent; }
if ($args ~* ^id=d642f055-e992-4d07-83e4-3279c28cefd8$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-d642f055-e992-4d07-83e4-3279c28cefd8? permanent; }
if ($args ~* ^id=dd98caf5-c599-4adf-9fa1-e94b4073e7ef$){ rewrite ^/bespoke/podcast$ /bespoke/podcast_id-dd98caf5-c599-4adf-9fa1-e94b4073e7ef? permanent; }
if ($args ~* ^ref=producthunt$){ rewrite ^/bespoke$ /bespoke_ref-producthunt? permanent; }
if ($args ~* ^ref=upstract\.com$){ rewrite ^/bespoke$ /bespoke_ref-upstract_com? permanent; }
if ($args ~* ^via=browsingai$){ rewrite ^/bespoke$ /bespoke_via-browsingai? permanent; }

# Create pretty URLs
rewrite ^/([^/]+)$ /$1.html last;
rewrite ^/([^/]+)/([^/]+)$ /$1/$2.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9.html last;
rewrite ^/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /$1/$2/$3/$4/$5/$6/$7/$8/$9/$10.html last;
# End: Create pretty URLs

# Redirect all extensions to html
if ($is_args = ''){
	rewrite ^([^.]*)\.shtml$ $1.html permanent;
	rewrite ^([^.]*)\.phtml$ $1.html permanent;
	rewrite ^([^.]*)\.jhtml$ $1.html permanent;
	rewrite ^([^.]*)\.htm$ $1.html permanent;
	rewrite ^([^.]*)\.php$ $1.html permanent;
	rewrite ^([^.]*)\.aspx$ $1.html permanent;
	rewrite ^([^.]*)\.asp$ $1.html permanent;
	rewrite ^([^.]*)\.jsp$ $1.html permanent;
	rewrite ^([^.]*)\.apk$ $1.html permanent;
}
# End: Redirect all extensions to html
