Gregory Alexander
02/24/2025, 8:32 AMgsr
02/24/2025, 11:25 AMBill Nourse
02/24/2025, 4:08 PMbdw429s
02/24/2025, 8:32 PMbdw429s
02/24/2025, 8:33 PMserver set web.rewrites.enable=true
bdw429s
02/24/2025, 8:34 PMbdw429s
02/24/2025, 8:35 PM<http://site.com/foo/bar|site.com/foo/bar>
the web server rewrite changes it to
<http://site.com/index.cfm/foo/bar|site.com/index.cfm/foo/bar>
which is the CF engine sees come in a
cgi.path_info = "/foo/bar"
you then read that info in your index file and process the string as you see fit.Gregory Alexander
02/25/2025, 6:17 AMGregory Alexander
02/25/2025, 6:21 AMbdw429s
02/25/2025, 7:30 PMbdw429s
02/25/2025, 7:30 PMbdw429s
02/25/2025, 7:30 PMEvil Ware
02/27/2025, 3:10 PMRewriteEngine On RewriteRule ^([^/]+)/([^/]+)/?$ /index.cfm?param=$1&foo=$2 [L]
Evil Ware
02/27/2025, 3:10 PMEvil Ware
02/27/2025, 3:10 PMEvil Ware
02/27/2025, 3:12 PMEvil Ware
02/27/2025, 3:18 PMbdw429s
02/27/2025, 7:56 PMbdw429s
02/27/2025, 7:57 PMGregory Alexander
02/28/2025, 7:56 AMEvil Ware
02/28/2025, 3:30 PMbdw429s
02/28/2025, 5:07 PMgsr
02/28/2025, 6:43 PMGregory Alexander
03/01/2025, 9:16 AMbdw429s
03/03/2025, 12:22 AMGregory Alexander
03/08/2025, 7:39 AMGregory Alexander
03/08/2025, 7:49 AMGregory Alexander
03/08/2025, 7:49 AMGregory Alexander
03/08/2025, 8:13 AMGregory Alexander
03/08/2025, 8:21 AMGregory Alexander
03/08/2025, 8:25 AMbdw429s
03/09/2025, 3:16 AMgsr
03/09/2025, 11:53 AMGregory Alexander
03/09/2025, 11:25 PMGregory Alexander
03/09/2025, 11:35 PMgsr
03/10/2025, 12:02 AM# Enable mod_proxy in Apache
a2enmod proxy
a2enmod proxy_http
# Restart Apache
service apache2 restart
step 2
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyPassReverse / <http://127.0.0.1:8888/>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
# Handle existing .cfm files
RewriteCond %{REQUEST_FILENAME}\.cfm -f
RewriteRule ^(.+)\.cfm$ <http://127.0.0.1:8888/$1.cfm> [P,L]
# Let Lucee handle clean URLs internally
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ <http://127.0.0.1:8888/$1> [P,L]
</IfModule>
Add these security rules before your rewrite rules:
# Block direct CFML file access attempts
RewriteCond %{THE_REQUEST} \.cfm[\s/?] [NC]
RewriteRule ^ - [F,L]
# Prevent directory traversal
RewriteCond %{REQUEST_URI} ..+/.* [NC]
RewriteRule .* - [F,L]
Gregory Alexander
03/10/2025, 7:52 AM