Welcome! Log In Create A New Profile

Advanced

htaccess to nginx for PHPBB seo

Posted by anybodywise 
htaccess to nginx for PHPBB seo
January 09, 2010 12:08PM
I have always used Apache for my projects, but now I understand the magic of nginx :) Thank you for the great job!

Please addopt my little rewrites for PHPBB: Thank you ahead!!

[code]
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
# RewriteRule ^index\.html$ /index.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^[a-z0-9_-]+/([^/]+\.html)$ /index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^cat([0-9]+)\.html$ /index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^forum([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^forum([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^topic([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^topic([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
[/code]



Edited 1 time(s). Last edit at 01/09/2010 12:08PM by anybodywise.
Re: htaccess to nginx for PHPBB seo
January 15, 2010 02:10AM
Please help me.
Re: htaccess to nginx for PHPBB seo
January 16, 2010 12:11PM
location / {
rewrite ^/cat([0-9]+)\.html$ /index.php?c=$1 last;
rewrite ^/forum([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 last;
rewrite ^/forum([0-9]+)\.html$ /viewforum.php?f=$1 last;
rewrite ^/topic([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 last;
rewrite ^/topic([0-9]+)\.html$ /viewtopic.php?t=$1 last;
rewrite ^/post([0-9]+)\.html$ /viewtopic.php?p=$1 last;
rewrite ^/member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 last
}

or something like that :p
Re: htaccess to nginx for PHPBB seo
January 18, 2010 03:30PM
It works! Thank you a lot!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready