swissmant -
Joined: 01 Aug 2008 Posts: 4
|
Posted: Wed Jun 01, 2011 1:02 am Post subject: URL rewriting for CakePHP |
|
|
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] |
|