Copy link to clipboard
Copied
I'm looking for advices about the rewriting URLs fonction of cfWheels. I'm running an app on Adobe ColdFusion 2025, cfWheels 2.5.1 and CommandBox
I'm looking for rewriting URLs of the website (suppress the"/index.cfm/" prefix) and it works! great! BUT I don't have access to my CFIDE Admin Page, my Database and the cfWheels Routes Page.
I have to share with you my .htaccess code:
Options +FollowSymLinks
RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L] RewriteCond %{REQUEST_URI} ^/(CFIDE|cfide|CF_scripts|cf_scripts|wheels/routes) [NC]
RewriteRule ^ - [L] RewriteCond %{REQUEST_URI} ^/index.cfm/(.*)$ [NC]
RewriteRule ^index.cfm/(.*)$ /$1 [R=301,L]
RewriteRule ^(.*)$ /index.cfm/$1 [QSA,L]
There is my settings.cfm:
<cfscript>
set(coreTestDataSourceName="manytomany");
set(dataSourceName="manytomany");
set(URLRewriting="On");
</cfscript>
There is my server.json:
{
"app":{"cfengine":"adobe@2025" },
"name":"cf2025_project",
"web":{ "rewrites":{ "config":".htaccess", "enable":true },
"servletPassPredicate":"true" }
}
If someone have a idea of what's wrong with that? Thanks for your help!
Copy link to clipboard
Copied
Alexandre, since you're using cfwheels, you may get better help at the site and forum devoted to that, a s offered at https://cfwheels.org/.
Then, too, the fact that you show using a server.json file tells us you're using commandbox. And as that uses its own web server by default and has its own rewrite capabilities, you may well need to look at this from a Commandbox perspective. And for that you might want to raise this at the ortus Commandbox forums, https://community.ortussolutions.com/c/communities/commandbox
But perhaps someone may step in here, recognizing something to suggest based on what you have shared.
Copy link to clipboard
Copied
Thanks a lot Charlie for your answer!
You're right I'm gonna also check on cfwheels an ortus community. I'm new in Cf world and I didn't think about it.
Alexandre
Copy link to clipboard
Copied
Glad to have helped. Hope it goes well for you, there or here.
Copy link to clipboard
Copied
What happens when you try this one?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} ^/(CFIDE|cfide|CFIDE/.*|cf_scripts|CF_scripts|wheels/routes) [NC]
RewriteRule ^ - [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/index\.cfm/([^\s\?]*) [NC]
RewriteRule ^index\.cfm/(.*)$ /$1 [R=301,L]
RewriteRule ^(.*)$ /index.cfm/$1 [QSA,L]
Find more inspiration, events, and resources on the new Adobe Community
Explore Now