Welcome! Log In Create A New Profile

Advanced

IPB and CSEO FURL rule

Posted by yacenty 
IPB and CSEO FURL rule
June 28, 2009 05:06PM
Helo how to do nginx rewrite rule for such apache statement?
[code]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cseo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cseo/index.php [L]
</IfModule>
[/code]
thanks in advance
BR
YacentY
Re: IPB and CSEO FURL rule
July 01, 2009 03:40AM
# WordPress pretty URLs: (as per dominiek.com)
if (-f $request_filename) {
break;
}
if (-d $request_filename) {
break;
}
rewrite . /cseo/index.php last;

something like this

grts,

chris/eaonflux
Re: IPB and CSEO FURL rule
July 01, 2009 06:13PM
doesn't help
sw generates link like:

http://www.xxxxxx.pl/board/ceny-maszyn-f13.html

but when I clik on it I'm sent to: http://www.xxxxx.pl/board/index.php?

what is wrong? what should be done on nginx site? what on sw side?
on apache oryginal rule works OK



Edited 1 time(s). Last edit at 07/01/2009 06:14PM by yacenty.
Re: IPB and CSEO FURL rule
July 01, 2009 09:00PM
yacenty Wrote:
-------------------------------------------------------
> Helo how to do nginx rewrite rule for such apache
> statement?
>
>
> RewriteEngine On
> RewriteBase /cseo/
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /cseo/index.php
>
>
> thanks in advance
> BR
> YacentY

If you are using latest stable or development versions you can try:

[code]
location /cseo {
try_files $uri $uri/ /cseo/index.php ;
}
[/code]

--
Jim Ohlstein
Re: IPB and CSEO FURL rule
July 02, 2009 02:42AM
is 0.6 enough version for such command?
Re: IPB and CSEO FURL rule
July 02, 2009 03:09AM
ah you got the same prob as me, and no the 6 version doesnt support that when i read it correct from jim.

just download the tar file compile it with ssl support or download it from your distro if avaible.
i got a similair prob with cgi.

grts,

chris
Re: IPB and CSEO FURL rule
July 18, 2009 08:09AM
some addition,
here is the comment from author of addon for IPB.

I'm using nginx rewrite module and have this code in place:

location /board {
if (!-e $request_filename) {
rewrite . /board/index.php last;
}
}

And even though I'm using !-e, requests for images that exist are being rewritten through index.php. Anyone know why this might be?
Re: IPB and CSEO FURL rule
July 18, 2009 11:22AM
what's the full config? does root specified in location / { } or in server { } ?

If it's specified in location block (location / { root /path/to/root; }) then you need to set the root again.

At any rate use try_files if you're using 0.6.37 or newer
Re: IPB and CSEO FURL rule
July 18, 2009 04:07PM
#user nobody;
worker_processes 1;

error_log /data/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 1024;
}


http {
client_max_body_size 1024m;
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] $request '
# '"$status" $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

access_log /data/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

#server {
# listen 80;
# server_name test.xxxxxxxxxx.xxx www.test.xxxxxxxx.xxx;
#
# rewrite ^(.*) http://www.xxxxxxxxxxxxx.xxx$1 permanent;
# }

server {
listen 80;
server_name www.xxxxxxxxxx.xxx;

#charset koi8-r;

#access_log logs/host.access.log main;

location /board/ {
# root /home/xxxxxxxxxx/public_html;
# index index.php index.html index.htm;
# if (!-e $request_filename) {
# rewrite ^/board/(.*)$ /board/index.php?q=$1 last;
# break;
# }
# rewrite . /board/index.php last;
#if (-e $request_filename) {
#break;
#}
#if (-d $request_filename) {
#break;
#}
#rewrite . /board/index.php last;
#}

#location /board {
#if (!-e $request_filename) {
#rewrite . /board/index.php last;
#}
try_files $uri $uri/ /board/index.php ;
}
location / {
root /home/xxxxxxxxxx/public_html;
index index.php index.html index.htm;
# # DO THE FORUM INDEX
rewrite ^/forum/forums\.html(.*)$ /forum/index.php?act=idx$1 last;
rewrite ^/forum/index\.html(.*)$ index.php?act=idx$1 last;
rewrite ^/forum/\$ index.php?act=idx last;

#
# Portal
# rewrite ^/forum/(.*)home\.html(.*)$ /forum/index.php?act=home$2
#

# DO THE ANNOUNCEMENT URLS
rewrite ^/forum/a([0-9]*)\.html(.*)$ /forum/index.php?act=announce&id=$1$2 last;
rewrite ^/forum/a([0-9]*)[-_,]in[-_,]forum([0-9]*)\.html(.*)$ /forum/index.php?act=announce&f=$2&id=$1$3 last;
rewrite ^/forum/(.*)[-_,]a([0-9]*)\.html(.*)$ /forum/index.php?act=announce&id=$2$3 last;
rewrite ^/forum/(.*)[-_,]a([0-9]*)[-_,]in[-_,]forum([0-9]*)\.html(.*)$ /forum/index.php?act=announce&f=$3&id=$2$4 last;
#
[cut ...]

}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/xxxxxxxxxx/public_html$fastcgi_script_name;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


}

I'm using latest stable version so it's about 0.7.61
Re: IPB and CSEO FURL rule
July 18, 2009 04:18PM
after puting root it helped :) thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
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