New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal - add urlrewrite.xml to root to support commandbox/tuckey #649

Closed
neokoenig opened this Issue Jul 11, 2016 · 3 comments

Comments

1 participant
@neokoenig
Member

neokoenig commented Jul 11, 2016

I propose we add urlrewrite.xml to the root of the directory alongside htaccess etc to support tuckey:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
    PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
    "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">

<urlrewrite>
  <rule enabled="true">
    <name>CFWheels pretty URLs</name>
    <condition type="request-uri" operator="notequal">^/(flex2gateway|jrunscripts|cfide|cfformgateway|cffileservlet|lucee|files|images|javascripts|miscellaneous|stylesheets|robots.txt|favicon.ico|sitemap.xml|rewrite.cfm|index.cfm)</condition>
    <from>^/(.*)$</from>
    <to type="passthrough">/index.cfm/$1</to>
  </rule>
</urlrewrite>

This means it's trivial to get commandbox running a site with full urlrewriting out of the box by using server.json, i.e:

{
    "name":"mywheelssite",
    "force":true,
    "web":{
        "http":{
            "host":"localhost",
            "port":60006
        },
        "rewrites":{
            "enable":true,
            "config":"urlrewrite.xml"
        }
    }
}

Thoughts? I'd like to get it working with rewrite.cfm rather than index.cfm too.

@neokoenig neokoenig added this to the 2.0.0 milestone Jul 11, 2016

neokoenig added a commit that referenced this issue Jul 18, 2016

Adds urlrewrite.xml to root to support commandbox/tuckey #649
Signed-off-by: Tom King <admin@oxalto.co.uk>

@neokoenig neokoenig added the docs label Jul 18, 2016

@neokoenig

This comment has been minimized.

Member

neokoenig commented Jul 18, 2016

NB, document in 2.x branch on readme that this file now exists, and all you need to do is add a server.json or start with commandline arguments.

@neokoenig

This comment has been minimized.

Member

neokoenig commented Jul 25, 2016

Docs updated
http://docs.cfwheels.org/v1.4/docs/commandbox
http://docs.cfwheels.org/v2.0/docs/commandbox

NB, 1.4 differ slightly as supplied multiengine json files are only from 2.x onwards

@neokoenig neokoenig closed this Jul 25, 2016

@neokoenig

This comment has been minimized.

Member

neokoenig commented Jun 1, 2017

Note; in 2.0 beta 1 this is actually removed from root but is available via wheels new cli command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment