Thursday, May 30, 2013

Re: php cms and rewriteRule and cakephp routes

We use our own CMS with CakePHP websites (we're currently translating our own cms into a new cakephp cms.). We use the same structure as you, (app, lib, plugins, vendors, cms) and we don't do anything with the .htaccess files inside the cakephp part (we also use routes, but don't create a /cms route especially). We do have this inside our cms map in the .htaccess:
RewriteEngine On
RewriteBase /

RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/$ cms/?module=$1&page=$2&pagenumber=$3&get4=$4&get5=$5 [L]
RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ cms/?module=$1&page=$2&pagenumber=$3&get4=$4 [L]
RewriteRule ^(.*)/(.*)/(.*)/$ cms/?module=$1&page=$2&pagenumber=$3 [L]
RewriteRule ^(.*)/(.*)/$ cms/?module=$1&page=$2 [L]
RewriteRule ^(.*)/$ cms/?module=$1 [L]

We can access our cms at websitename.com/cms. I hope something like this will also work for you!

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: