Skip to content

Commit 5ed0070

Browse files
jclausengitbook-bot
authored andcommitted
GITBOOK-68: change request with no subject merged in GitBook
1 parent 9b301d9 commit 5ed0070

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

the-basics/routing/requirements/rewrite-rules.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,26 @@ RewriteRule ^(.*)$ - [NC,L]
1818
RewriteRule ^$ index.cfm [QSA,NS]
1919
RewriteCond %{REQUEST_FILENAME} !-f
2020
RewriteCond %{REQUEST_FILENAME} !-d
21-
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [PT,QSA,L,NS]
21+
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L,NS]
2222
```
2323
2424
{% hint style="warning" %}
25-
Recent versions of Apache don't send the CGI.PATH\_INFO variable to your cfml engine when using ProxyPass and ProxyPassMatch without the `PT` ( Pass Through ) directive. On current versions of Coldbox, you can also use a [pathInfoProvider](../pathinfo-providers.md) function in your router.cfc
25+
Recent versions of Apache don't send the CGI.PATH\_INFO variable to your cfml engine when using ProxyPass and ProxyPassMatch without the `PT` ( Pass Through ) directive. 
26+
27+
On current versions of Coldbox, you can also use a [pathInfoProvider](../pathinfo-providers.md) function in your router.cfc or use the updated PassThrough configuration with a leading slash on the index.cfm below
2628
{% endhint %}
2729
28-
The following solution will also work if you are using a recent version of Apache. This should be part of your `.htaccess` file
30+
Updated syntax for Apache:
31+
32+
```
33+
#The ColdBox index.cfm/{path_info} rules.
34+
RewriteRule ^$ index.cfm [QSA,NS]
35+
RewriteCond %{REQUEST_FILENAME} !-f
36+
RewriteCond %{REQUEST_FILENAME} !-d
37+
RewriteRule ^(.*)$ /index.cfm/%{REQUEST_URI} [PT,QSA,L,NS]
38+
```
39+
40+
The following solution will also work if you are using recent versions of Apache and Coldbox:
2941
3042
```
3143
#The ColdBox index.cfm/{path_info} rules.

0 commit comments

Comments
 (0)