I have a working version of contentbox. I have enabled url rewrite and all works great.
But I have a question: it’s possible to completely remove index.cfm from url?
I explain better. Right now my url are displayed as www.mysite.com/my-page but this page works also if the url is www.mysite.com/index.cfm/my-page.
I’d like to have a 301 redirect from mysite.com/index.cfm/my-page to mysite.com/my-page.
Is this possible? I have not much knoweledge about htaccess and url rewriting. Will something like this work?
`
RewriteEngine on
#RepeatLimit 0
#I redirect all request to url without index.cfm
RewriteRule ^/index.cfm/?(.*)$ /$1 [R=301,L]
#if this call related to adminstrators or non rewrite folders, you can add more here.
RewriteCond %{REQUEST_URI} ^/(.(CFIDE|cfide|CFFormGateway|jrunscripts|railo-context|mapping-tag|fckeditor)).$
RewriteRule ^(.*)$ - [NC,L]
#dealing with flash / flex communication
RewriteCond %{REQUEST_URI} ^/(.(flashservices|flex2gateway|flex-remoting)).$
RewriteRule ^(.*)$ - [NC,L]
#font awesome
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType font/woff .woff
<FilesMatch “.(ttf|otf|eot|woff)$”>
Header set Access-Control-Allow-Origin “*”
Media Types
RewriteCond %{REQUEST_URI} /__media/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L,NS]
#Images, css, javascript and docs, add your own extensions if needed.
RewriteCond %{REQUEST_URI} .(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf)$
RewriteRule ^(.*)$ - [NC,L]
#The ColdBox index.cfm/{path_info} rules.
RewriteRule ^$ index.cfm [QSA,NS]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm/%{REQUEST_URI} [QSA,L,NS]
`