So I recently converted a website. Built the whole thing out on my mac using Command Box and Coldbox. It has a lot of rewrites and special routing. Everything works great locally. When I update to my linux server none of the routing works. it sends everything to the front page. I tried putting in an htaccess with some of the recommended settings I found on line, still everything just gets sent to the front page. without the htaccess file I just get errors. Obviously I am missing something but even basic routes don’t work like domain/main/stats which goes to main.stats throws me to the front page. What are something things I need to look at?
Let me also add that I just uploaded the site from my local to my server. I did not install coldbox on the server directly just uplaoded everything. Maybe there is a setting in lucee I forgot? Although the front page loads so I know it’s working as far as serving up at least the front page files and layout.
Hopefully I’m explaining this right just trying to give as much info as possible.
Here’s my current route cfc just has a couple special routes
route(“/main/contact-us”).to(“main.contactus”);
route(“/journal/username/:username/”,“journal.index”);
route(“/journal/dream/:dreamid-numeric/username/:username/”,“journal.dream”);
route(“/journal/dream/:dreamid-numeric/”,“journal.dream”);
Then my OLD htaccess file
which I shoulnd’t need since it’s now all handled either via router.cfc or basic views
RewriteRule “^/?journal/dream/([^/]+)/user/([^/]+)/” “/journal/dream.cfm?dream_id=$1&username=$2”
RewriteRule “^/?journal/username/([^/]+)” “/journal/default.cfm?username=$1”
RewriteRule “^/?main/dreamsymbol/([^/]+)” “/main/definition.cfm?symbol=$1”
RewriteRule “^/?journal/user/([^/]+)” “/journal/default.cfm?username=$1”
RewriteRule “^/?journal/default/user/([^/]+)” “/journal/default.cfm?username=$1”
RewriteRule “^/?journal/friendsdreams/username/([^/]+)” “/journal/friendsdreams.cfm?username=$1”
RewriteRule “^/?main/results/keyword/([^/]+)” “/main/results.cfm?keyword=$1”
RewriteRule “^/?journal/dream/username/([^/]+)/dream_id/([^/]+)” “/journal/dream.cfm?dream_id=$2&username=$1”
RewriteRule “^/?journal/dream/dream_id/([^/]+)/username/([^/]+)” “/journal/dream.cfm?dream_id=$1&username=$2”
Based on some stuff I found online I did add this to my htaccess
RewriteRule ^$ index.cfm [QSA,NS]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.cfm?%{REQUEST_URI} [QSA,L,NS]
So that gets rid of errors but any link lands on the front page.
Also getting an error (via email) when I load a page that states
" TimeStamp: {ts ‘2023-10-31 12:28:25’}
Severity: 2
Category: coldbox.system.web.Renderer
renderview() has been deprecated, please update your code to view()"
Which seems odd since I just installed coldbox 2 weeks ago locally.