Advertisement
Guest User

Untitled

a guest
Aug 27th, 2011
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. A tutorial for getting rewrite rules (MyBB SEF style) work with nginx:
  2.  
  3. http://community.mybboard.net/thread-51764.html
  4.  
  5. The same method can be applied for Google SEO rewrite rules, but you
  6. have to create those rules manually. Google SEO can not detect that
  7. you are not using Apache, and will only generate .htaccess rules.
  8.  
  9. Here is an example of what nginx rules for Google SEO look like:
  10.  
  11. # Google SEO workaround for search.php highlights:
  12. # Make this rule the first rewrite rule in your .htaccess!
  13. rewrite ^/MyBB/([^&]*)&(.*)$ http://yoursite/MyBB/$1?$2 permanent;
  14.  
  15. # Google SEO Sitemap:
  16. rewrite ^/MyBB/((?i)sitemap-([^./]+)\.xml)$ /MyBB/misc.php?google_seo_sitemap=$2;
  17.  
  18. # Google SEO URL Forums:
  19. rewrite ^/MyBB/((?i)Forum-([^./]+))$ /MyBB/forumdisplay.php?google_seo_forum=$2;
  20.  
  21. # Google SEO URL Threads:
  22. rewrite ^/MyBB/((?i)Thread-([^./]+))$ /MyBB/showthread.php?google_seo_thread=$2;
  23.  
  24. # Google SEO URL Announcements:
  25. rewrite ^/MyBB/((?i)Announcement-([^./]+))$ /MyBB/announcements.php?google_seo_announcement=$2;
  26.  
  27. # Google SEO URL Users:
  28. rewrite ^/MyBB/((?i)User-([^./]+))$ /MyBB/member.php?action=profile&google_seo_user=$2;
  29.  
  30. # Google SEO URL Calendars:
  31. rewrite ^/MyBB/((?i)Calendar-([^./]+))$ /MyBB/calendar.php?google_seo_calendar=$2;
  32.  
  33. # Google SEO URL Events:
  34. rewrite ^/MyBB/((?i)Event-([^./]+))$ /MyBB/calendar.php?action=event&google_seo_event=$2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement