Permalinks: Identical code, different servers, one interrupts 301 redirects

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 26, 2014   (RSS)

By Dave - February 26, 2014

Hi Benedict,

Can you try re-ordering the file like this?

## 301 Redirects
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{QUERY_STRING}  ^Samples-4$ [NC]
RewriteRule ^nonslip-products\.php$ /samples? [R=301,NE,NC,L]

# START: CMS Permalink Code
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^permalinks_dispatcher\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /cmsAdmin/plugins/permalinks/permalinks_dispatcher.php [L]
</IfModule>
# END: CMS Permalink Code

Basically we want to run all your code in this case before permalinks.

Let me know if that works for you or gets you any closer. 

Dave Edis - Senior Developer
interactivetools.com

So simple... Thanks Dave.