# Vbseo rewrite

**URL:** <https://www.ruby-forum.com/t/vbseo-rewrite/218252>\
**Category:** NGINX\
**Created:** [March 26, 2012, 12:42pm UTC](https://www.ruby-forum.com/t/vbseo-rewrite/218252 "2012-03-26T12:42:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 26, 2012, 12:42pm UTC](https://www.ruby-forum.com/t/vbseo-rewrite/218252/1 "2012-03-26T12:42:16Z")

</div>

Hi,

I have a wordpress site with vbulletin+vBSEO forum section under  
“/forum/” directory and I’m trying to move this site from apache2 to  
nginx 1.0.12.  
Everything works good except the vBSEO rewrite rules.

The webserver is configured with a chain(1) of serveral components in  
order to speed up the web requests.  
I have “varnish” listening on port 80 that forwards the requests to  
nginx on port 8069.  
Nginx is provided with apc cache and uses php-fpm on port “9000” to  
handle php requests.  
The wordpress is also provided with W3TotalCache.  
Tha server setup is based on ISPConfig 3.0.4.3.

When I try to access the forum section I recive a “500 Internal Server  
Error”.  
/var/log/ispconfig/httpd/www.domain.com/error.log says:

[error] 14702#0: \*30 rewrite or internal redirection cycle while  
processing “/forum/vbseo.php”, client: 127.0.0.1, server:  
[www.dominio.com](http://www.dominio.com), request: “GET /forum/ HTTP/1.1”, host:  
“[www.dominio.com](http://www.dominio.com)”, referrer: “[Website Domain Names, Online Stores & Hosting | Domain.com](http://www.dominio.com/FIRENDLY-URL/)”

The “forum” section is linked from the main wordpress menu.  
If I try to access directly the sections of the forum using the  
drop-down menù in wordpress I’m able to see it but the URL rewrited is  
not correct. The URL displayed is “[Website Domain Names, Online Stores & Hosting | Domain.com](http://www.dominio.com/subsectionoftheforum)”  
instead of “[Website Domain Names, Online Stores & Hosting | Domain.com](http://www.dominio.com/forum/subsectionoftheforum)”.  
However, this is a secondary problem.

/etc/nginx.conf is the default, I just added this lines of code for  
Cloudflare part:

set\_real\_ip\_from 204.93.240.0/24;  
set\_real\_ip\_from 204.93.177.0/24;  
set\_real\_ip\_from 199.27.128.0/21;  
set\_real\_ip\_from 173.245.48.0/20;  
set\_real\_ip\_from 103.22.200.0/22;  
set\_real\_ip\_from 141.101.64.0/18;  
set\_real\_ip\_from 108.162.192.0/18;  
real\_ip\_header CF-Connecting-IP;

This(2) is my "/etc/nginx/sites-enabled/dominio.vhost:

> **[server { listen 8069; server\_name www.dominio.com; - Pastebin.com](https://pastebin.com/s93rDtUu)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

As you can see the configuration file is subdivided in 4 sections:

- general
- vBulletin - VBSEO
- wordpress
- W3TotalCache

I tried to remove wordpress and W3TC part in order to exclude conflict  
problems but I didn’t resolved the issue.  
Anyway I tried it with other rewrite URL set.

The vBSEO rewrite rule set is the one suggested by vBSEO developers.

I’ve already opened a support ticket on vBSEO customer support section.  
They says the code is correct and I have a conflict issue with wordpress  
and other directives.  
This what tey say:

* * *

## Your nginx rules look ok but the issue is it looks like you have conflicting url rewrite rules all around. You should either hire an experienced nginx administrator to fix the issue or remove your wordpress rules as they don’t look ok and we can’t assist you on fixing third party script rules.

## Your rules look ok. However you seem to have other issues. Again your best bet is hiring someone experienced or reverting back to the web server you are confident with.

If is necessary I can upload this other configuration files:

- nginx.conf (entire)
- apc.ini
- a txt file with all the rewrite rule sets i tried.
- php.ini
- php-fpm.conf
- default.vcl

Thank you in advance for your reply.  
Maurizio

(1) all the requests comes from cloudflare - I set up all the  
“set\_real\_ip” directives in nginx.conf

(2) I used “pastebin” service as a matter of order of this post.

Posted at Nginx Forum:

> **[vbseo rewrite](https://forum.nginx.org/read.php?2,224398,224398#msg-224398)**
>
> Hi, I have a wordpress site with vbulletin+vBSEO forum section under "/forum/" directory and I'm trying to move this site from apache2 to nginx 1.0.12. Everything works good except the vBSEO rewrite rules. The webserver is configured with a...
