# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
<IfModule mod_rewrite.c>
RewriteEngine On
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$)
RewriteRule ^viewtopic\.php$ /forum/showthread.php?t=%2 [L,R=301,NC]
</IfModule>
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$)
RewriteRule ^viewtopic\.php$ /forum/showthread.php?t=%2 [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ /forums/%1 [L,R=301,NC]
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
<IfModule mod_rewrite.c>
RewriteEngine On
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^viewforum\.php$ /forums/%1 [L,R=301,NC]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
The only difference I see between your htaccess and mine, is that I have the phpBB rules before the xenforo ones
Hi guys
I'm going to be doing a phpBB to xenForo conversion soon. Arty has already posted a suggestion here regarding redirection. Will this method be OK?
As I explained in the thread linked above my phpBB url's are already SE friendly and use a structure like...
Forum: http://www.domain.com/forum/forum-name-f1.html
Topic: http://www.domain.com/forum/topic-t3337.html
Thanks
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_\-]+)-t([0-9]+)\.html$ /forum/showthread.php?t=$2 [L,R=301,NC]
RewriteRule ^([a-zA-Z0-9_\-]+)-f([0-9]+)\.html$ /forum/forumdisplay.php?f=$2 [L,R=301,NC]
What do you have in your .htaccess at the minute, and what were the URLs from your phpBB installation?I've running the same problem, have tried Jake tutorial but failed. Any help?
#cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
<IfModule mod_rewrite.c>
RewriteEngine On
#If you are having problems with the rewrite rules, remove the "#" from the
#line that begins "RewriteBase" below. You will also have to change the path
#of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
#This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$)
RewriteRule ^viewtopic\.php$ /forum/showthread.php?t=%2 [L,R=301,NC]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[0-9]+(\.[0-9]+){3} [OR]
RewriteCond %{HTTP_HOST} ^mail [OR]
RewriteCond %{HTTP_HOST} ^z22se.co.uk
RewriteRule (.*) http://www.z22se.co.uk/forum/$1 [R=301,L]
RewriteRule ^userpix/(.*) http://cdn.z22se.com/userpix/$1 [QSA,L]
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /forum/
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /forum/threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^(viewforum\.php|viewtopic\.php)$ /forum/forums/%1? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /forum/posts/%2? [L,R=301,NC]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^[0-9]+(\.[0-9]+){3} [OR]
RewriteCond %{HTTP_HOST} ^mail [OR]
RewriteCond %{HTTP_HOST} ^komikanimasi.web.id
#RewriteRule (.*) http://www.komikanimasi.web.id/forum/$1 [R=301,L]
RewriteRule (.*) http://www.forum.komikanimasi.web.id/$1 [R=301,L]
#RewriteRule ^userpix/(.*) http://cdn.z22se.com/userpix/$1 [QSA,L]
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /forum/
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^(viewforum\.php|viewtopic\.php)$ /forums/%1? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /posts/%2? [L,R=301,NC]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
#301 redirect non-www to www
server {
server_name v6mustang.com;
rewrite ^ http://www.v6mustang.com$request_uri? permanent;
}
server {
server_name www.v6mustang.com;
# ngx_pagespeed & ngx_pagespeed handler
include /usr/local/nginx/conf/pagespeed.conf;
include /usr/local/nginx/conf/pagespeedhandler.conf;
include /usr/local/nginx/conf/pagespeedstatslog.conf;
# limit_conn limit_per_ip 16;
# ssi on;
access_log /home/nginx/domains/v6mustang.com/log/access.log combined buffer=32k;
error_log /home/nginx/domains/v6mustang.com/log/error.log;
root /home/nginx/domains/v6mustang.com/public;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;
# Enables directory listings when index file not found
#autoindex on;
# Shows file listing times as local time
#autoindex_localtime on;
# Enable for vBulletin usage WITHOUT vbSEO installed
#try_files / /index.php;
}
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /vb/ {
rewrite ^/vb/f[\d]+/.+-([\d]+)/index([\d]+).html /vb/showthread.php?t=$1&page=$2 last;
rewrite ^/vb/f[\d]+/.+-([\d]+)/ /vb/showthread.php?t=$1 last;
rewrite ^/vb/f([\d]+)/index([\d]+).html /vb/forumdisplay.php?f=$1&page=$2 last;
rewrite ^/vb/f([\d]+)/ /vb/forumdisplay.php?f=$1 last;
}
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;
}
server {
server_name v6mustangforums.com www.v6mustangforums.com;
rewrite ^ $scheme://www.v6mustang.com$request_uri permanent;
# ngx_pagespeed & ngx_pagespeed handler
#include /usr/local/nginx/conf/pagespeed.conf;
#include /usr/local/nginx/conf/pagespeedhandler.conf;
#include /usr/local/nginx/conf/pagespeedstatslog.conf;
# limit_conn limit_per_ip 16;
# ssi on;
access_log /home/nginx/domains/v6mustangforums.com/log/access.log combined buffer=32k;
error_log /home/nginx/domains/v6mustangforums.com/log/error.log;
root /home/nginx/domains/v6mustangforums.com/public;
location / {
# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;
# Enables directory listings when index file not found
#autoindex on;
# Shows file listing times as local time
#autoindex_localtime on;
# Enable for vBulletin usage WITHOUT vbSEO installed
#try_files / /index.php;
}
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;
}
There are phpBB redirect scripts in a resource: http://xenforo.com/community/resources/redirection-script-for-phpbb-3-0-x-without-seo-urls.2326/
You'd just install those at the original location (you'll likely need to point a path to the XF files though; I haven't checked how those scripts work).
RewriteCond %{QUERY_STRING} (^|&)t=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /forum/threads/%2? [L,R=301,NC]
RewriteCond %{QUERY_STRING} f=(\d+)$ [NC]
RewriteRule ^(viewforum\.php|viewtopic\.php)$ /forum/forums/%1? [L,R=301,NC]
RewriteCond %{QUERY_STRING} (^|&)p=([0-9]+)(&|$) [NC]
RewriteRule ^viewtopic\.php$ /forum/posts/%2? [L,R=301,NC]
We use essential cookies to make this site work, and optional cookies to enhance your experience.