• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Rewrite Rules Problem


Well-known member
I am on a Windows 2008 r2 server with Helicontech isapi rewrite 3 installed.

I added the rewrite rules to my .htaccess file in the forum root. Turned on friendly urls in admin and started to browse the site. The urls do work, however, all styling is gone. I have been editing the rules for 2 days and I either get the style working with 404's all over or no style and working url's.

Here is the contents of my .htaccess file:
# Helicon ISAPI_Rewrite configuration file
# Version
RewriteEngine On
RewriteBase /
RewriteRule ^/index\.php$ http\://justbs\.us/ [NC,R=301]
RewriteCond %{HTTP:Host} ^www\.justbs\.us$
RewriteRule (.*) http\://justbs\.us$1 [NC,R=301]
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]
# Redirects for old IPB URL's
RewriteCond %{REQUEST_URI} /(topic|forum|user)/ [OR]
RewriteCond %{QUERY_STRING} (^|&)show(topic|forum|user)= [OR]
RewriteCond %{QUERY_STRING} ^/(topic|forum|user)/ [OR]
RewriteCond %{PATH_INFO} ^/(topic|forum|user)/
RewriteRule ^.*$ ips2xf.php [NC,L]
Any ideas on what could be wrong?


XenForo developer
Staff member
Try changing this:
RewriteCond %{REQUEST_URI} /(topic|forum|user)/ [OR]
RewriteCond %{REQUEST_URI} ^/(topic|forum|user)/ [OR]
It applies if your forum is in the root (or your use the rewrite base).


Well-known member
Disregard this. Turns out one simple change was all that was needed. Sometimes posting about a problem brings a clear perspective and you can see the easy fix.

For those that run IIS with isapi rewrite 3 this line needs to be changed and it's a very simple fix.

RewriteRule ^.*$ index.php [NC,L]
to this

RewriteRule /.*$ index.php [NC,L]
Just replace the ^ with a forward slash and all works as expected.