URL rewriting for CakePHP

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
swissmant
-


Joined: 01 Aug 2008
Posts: 4

PostPosted: Wed Jun 01, 2011 1:02 am    Post subject: URL rewriting for CakePHP Reply with quote

I have installed CakePHP on my system and I'm trying to configure it with Abyss X1. Does anyone have any setting for this. I tried converting each rule as it appeared in the .htaccess files, but no joy. So, I found an article which is for Windows re-writes: http://book.cakephp.org/view/1636/URL-Rewrites-on-IIS7-Windows-hosts and I've adapted this into 4 re-write rules. However, I have not dealt with the first rule that they include:

Code:
<match url="^(ico|img|css|files|js)(.*)$" />
           <action type="Rewrite" url="app/webroot/{R:1}{R:2}" appendQueryString="false" />


So, I get diversions and display of pages, but images, css, etc. are missing.

Any suggestions would be much appreciated.

Here are the four rules that I have created (in the order that they run):

1.

Virtual path reg expression: /CakeTooDoo/app/webroot/^(.*)$

Conditions:
REQUEST_FILENAME is not a directory
REQUEST_FILENAME is not a file

Apply to subrequests too
Perform an internal redirection to:
/CakeTooDoo/app/webroot/index.php?url=$1
Append Query String: Yes
Escape Redirection Location: Yes
Next Action: Stop matching

2.

Virtual path reg expression: /CakeTooDoo/^$

Conditions:
None

Apply to subrequests too
Perform an internal redirection to:
/CakeTooDoo/
Append Query String: Yes
Escape Redirection Location: Yes
Next Action: Stop matching

3.

Virtual path reg expression: /CakeTooDoo/^(.*)$

Conditions:
REQUEST_FILENAME is not a directory
REQUEST_FILENAME is not a file

Apply to subrequests too
Perform an internal redirection to:
/CakeTooDoo/index.php?url=$1
Append Query String: Yes
Escape Redirection Location: Yes
Next Action: Stop matching

4.

Virtual path reg expression: /CakeTooDoo/(.*)

Conditions:
None

Apply to subrequests too

Perform an internal redirection to:
/CakeTooDoo/app/webroot/index.php?url=$1

Append Query String: Yes
Escape Redirection Location: Yes
Next Action: Continue with the next rule[/code]
Back to top View user's profile Send private message
jibbajabba
-


Joined: 06 Sep 2005
Posts: 241
Location: England, Doncaster

PostPosted: Thu Jun 02, 2011 4:21 am    Post subject: Reply with quote

The mod rewrite translater should be able to help you. http://www.aprelium.com/forum/viewtopic.php?t=16199
_________________
http://www.jibba-jabba.net | http://www.mosthauntedforum.com
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group