Re: Getting "pretty" URLs in html output


Mica Semrick
 

Hi David,

I'd suggest you handle this at the webserver level rather than the page level. For apache, this can probably be handled by mod-rewrite and for nginx, there are similar expressions. You'd want an expression that says "if the requested page is example.com/foo.html then serve and redirect to example.com/foo";

This would save you the probable heart ache of trying to convince to OT to spit out prettified directory schemes.

-m


On November 14, 2016 12:41:07 PM PST, "David Goss goss@... [dita-users]" wrote:
I've been pushing some DITA content onto a Jekyll site, and I've had some problems getting "pretty" links to work.

Example:

http://www.example.org/docs/topics/getting-started.html

I would want this to be rendered as:

http://www.example.org/docs/topics/getting-started/

(in that directory, there would be an index.html)

This sounds silly, but I don't like that the DITA content on the site has a different URL scheme than the rest of the site. It irks me in the sort of way that bad kerning annoys typographiles.

My initial thought was to change outext to "/index.html" Besides being a hacky and terrible idea, this still keeps all links to an *.html file.




David Goss, Technical Writer
Frontier Science (www.frontierscience.org)
LDMS (www.ldms.org)






This message was secured by ZixCorp(R).





Posted by: David Goss







Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/dita-users/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/dita-users/join
(Yahoo! ID required)

<*> To change settings via email:
dita-users-digest@...
dita-users-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
dita-users-unsubscribe@...

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/

Join main@dita-users.groups.io to automatically receive all group messages.