tas2580 / seourls

phpBB Extension: URL rewriting for phpBB forums
https://tas2580.net/downloads/phpbb-seo-url/
GNU General Public License v2.0
44 stars 25 forks source link

Nginx configuration not working (as per documentation) #29

Open bovidiu opened 8 years ago

bovidiu commented 8 years ago

As per documentation i've configured my forum for nginx, however, when it is to access a forum topic, i get 404

Cannot find GET /lorem-ipsum-f4/lipsum-t2.html

Could you please suggest a solution?

tas2580 commented 8 years ago

Sorry but I have no nginx installed, maybe someone who uses nginx can give me his working rewrite config.

Naguissa commented 7 years ago

Hello,

Form my LOCAL server (still making tests on local) I had to remove extra "break" at the en of lines:

location / {
            # First attempt to serve request as file, then as directory, then trigger 404
            try_files $uri $uri/ /index.php?q=$uri&$args;

## SEO URLs
rewrite ^/(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html /viewtopic.php?f=$2&t=$4&start=$5&$query_string;
rewrite ^/(.*)-f([0-9]*)/(.*)-t([0-9]*).html /viewtopic.php?f=$2&t=$4&$query_string ;
rewrite ^/(.*)-f([0-9]*)/index-s([0-9]*).html /viewforum.php?f=$2&start=$3&$query_string;
rewrite ^/(.*)-f([0-9]*)/ /viewforum.php?f=$2&$query_string;
rewrite ^/(.*)-f([0-9]*) /viewforum.php?f=$2&$query_string;
## End SEO URLs

}

Anything special in other lines: block "^.ht" files (htacces and .htpassword) and configure php-fpm for .php files.

Still I cannot see sitemap I was checking issues before opening new ticket...

Naguissa commented 7 years ago

Oh! The issue I has having was to download PHP code files instead execute them!

scheccia1 commented 7 years ago

replace "break" with "last"