Lucee / Linux / Apache - htaccess rewrite not working

426 views
Skip to first unread message

Dan Byron

unread,
Apr 15, 2015, 2:12:45 AM4/15/15
to cfwh...@googlegroups.com
I've confirmed that htaccess is working (set a new DirectoryIndex to test) but when I enable the included htaccess rules, the root URL (domain.com/) comes up a blank white page.  I have to hit domain.com/index.cfm to see any content.  If I disable the htaccess rules the root URL (domain.com/) will properly redirect to the domain.com/index.com/controller/action

Any thoughts?  The site is working otherwise without the rewrite enabled.

Per Djurner

unread,
Apr 15, 2015, 2:26:08 AM4/15/15
to cfwh...@googlegroups.com

On Wed, Apr 15, 2015 at 3:51 AM, Dan Byron <d...@byron.me> wrote:
I've confirmed that htaccess is working (set a new DirectoryIndex to test) but when I enable the included htaccess rules, the root URL (domain.com/) comes up a blank white page.  I have to hit domain.com/index.cfm to see any content.  If I disable the htaccess rules the root URL (domain.com/) will properly redirect to the domain.com/index.com/controller/action

Any thoughts?  The site is working otherwise without the rewrite enabled.

--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels.
For more options, visit https://groups.google.com/d/optout.

Dan Byron

unread,
Apr 15, 2015, 9:39:16 AM4/15/15
to cfwh...@googlegroups.com
Thanks for the reply.  Just tried that tweak with no success.  I have a feeling it could be due to running Apache 2.2.15 on CentOS 6.6. I'll look into an Apache upgrade path to see if that route works.  Thanks!

Per Djurner

unread,
Apr 15, 2015, 9:46:51 AM4/15/15
to cfwh...@googlegroups.com
Great, let us know if you find anything.

There's been a lot of similar issues recently and it would be nice to at least get some of them solved :)

Bill

unread,
Jun 17, 2015, 7:32:33 AM6/17/15
to cfwh...@googlegroups.com
If anyone has gotten CFWheels to rewrite under Apache/Lucee PLEASE post the solution.

I have my site working completely under Ubuntu / Apache / Lucee however only on partial rewrite. Anything and everything I try fails.

Bill

unread,
Jun 17, 2015, 7:58:43 AM6/17/15
to cfwh...@googlegroups.com
Lulz. Just got it working. Here's my virtualhost .conf file if it helps anyone.

<VirtualHost *:80>

ServerName mysite.com

ServerAdmin ad...@mysite.com
DocumentRoot /var/www/mysite.com
DirectoryIndex index.cfm
ProxyPreserveHost On
ProxyPassReverse / http://127.0.0.1:8888/
RewriteEngine On
RewriteCond %{REQUEST_URI} ^.*/index.cfm/(.*)$ [NC]
RewriteRule ^.*/index.cfm/(.*)$ http://127.0.0.1:8888/rewrite.cfm/$1 [P,QSA]

RewriteCond %{REQUEST_URI} !^.*/(flex2gateway|jrunscripts|fonts|cfide|cfformgateway|cffileservlet|railo-context|files|images|javascripts|miscellaneous|stylesheets|robots.txt|favicon.ico|sitemap.xml|rewrite.cfm|remote)($|/.*$) [NC]
RewriteRule ^(.*)$ http://127.0.0.1:8888/rewrite.cfm/$1 [P,QSA]

#RewriteRule ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2 [P,QSA]
#RewriteRule ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2 [P,QSA]

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
Reply all
Reply to author
Forward
0 new messages