Michael Check wrote:
Thanks Brad!

I did google it and found this:

RewriteCond %{THE_REQUEST} ^GET\ /.*/index\.(a4d|php|html)\ HTTP
RewriteRule (.*)index\.(a4d|php|html)$ /$1 [R=301,L]

Which adding to the apache vhosts config allows the browser to send:
http://caderms.local/?loc=apps.main

Which gets it interpreted as:
http://caderms.local/index.a4d?loc=apps.main

Cool.  But do I have to create the urls in fusebox (my app) to push
these pretty urls, or is there another rewrite rule that converts the
'ugly' URLs to pretty ones?
AFAIK, the rewriting only works for the request. However, if they click on, or type http://caderms.local/?loc=apps.main the pretty URL will not change in the address bar. The fact that you are using fusebox is hidden to them.

In terms of how the pretty URLs end up in your page source, you'll need Active4D to change those for you. Since we don't use fusebox (not by choice, but timing) I'm admittedly not familiar with the internals. But, I'd think that with a little Regex magic and a modification to (or wrapper around) "fusebox.makeURL" you should be able to make the fusebox URLS 'pretty' without a great deal of effort.

-- Brad
Thanks!

On Thu, Jun 12, 2008 at 4:26 PM, Brad Perkins <[EMAIL PROTECTED]> wrote:
Michael Check wrote:
Sorry Brad, yes, you are exactly right.

I was thinking from the perspective that we would still create the
urls as we do now, but the user would see them as pretty.

Have you done this before?

Not for fusebox, but for some other Active4D pages

# Requests for FOO shortcut by Number, e.g, foo.example.net/500, gets the
user
# the detail form for FOO-00500. We care about HTTP_HOST because we also do
this for BAR.
             RewriteCond     %{HTTP_HOST}   ^foo\. [NC]
RewriteRule ^/([0-9]{1,5})$
http://localhost:8080/acr/api/openbynum.a4d?host=%{HTTP_HOST}&num=$1 [NC,P]
ProxyPassReverse  / http://localhost:8080

For fusebox, you could extend the example above, but it might get tricky if
you had a variable number of parameters in your query string and you have to
right rules for all the possible combinations.
I was thinking of looking at something like wordpress that does
exactly that in their .htaccess files.

We don't do our rewrite stuff in .htaccess, but  looking at those examples
is probably a good idea. You might also Google "fusebox mod_rewrite" or
"mod_rewrite SEO". I think a lot of sites that need to have search friendly
URLs for dynamic content do this type of thing.


Thanks,

Michael Check


On Thu, Jun 12, 2008 at 3:40 PM, Brad Perkins <[EMAIL PROTECTED]> wrote:

Michael,>
Just so I understand what you want mod_rewrite to change, don't you mean
the
reverse?
this
 www.example.com/circuit/main/id/1/bst/20
or this:
 www.example.com/circuit/main/id=1;bst=20
would be rewritten to
 www.example.com/index.a4d/?fuseaction=circuit.main;id=1;bst=20

The end users would see the original URLs.

-- Brad
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/




_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to