question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I get clean URLs?

See original GitHub issue

I have some html files that I want to serve up, but I don’t want to put the file extensions in the names of the files, because I want clean URLs.

Can I have html files with names like index, about, and still serve them up like html files to port 8080?

The -e options doesn’t seem to work when doing http-server -e html site/. I get no character encoding declared errors in firefox and 404’s on the console.

If I do http-server site/ -e html then firefox promps me to download the index and about files.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BigBlueHatcommented, Apr 25, 2017

Good to know. I’ll focus my efforts on #160 then, and revisit more complex options later.

For my part, I’d like something similar to the File Handler in wptserve (a Python-based server for running the Web Platform Tests system at the W3C).

I’d like index to map to index.html (if it exists…and possibly through a series of other media types if found…perhaps optionally). I’d also very much like their .headers file thing for adding arbitrary headers to responses per file or directory. Super handy for all kinds of things. But decidedly a different issue. 😄

I’m going to close this in favor of focusing on #160 and/or filing additional more fixable bugs/features. 😉

Thanks for the feedback @wamoyo!

1reaction
wamoyocommented, Apr 25, 2017

I ended up doing a bit of a work around, but I did fork this repo and make some adjustments. I’m happy to explore, absolutely : )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable clean URLs - Drupal
Enabling Clean URLs in Drupal 7 · Navigate to the Clean URLs configuration page (Administer > Configuration > Search and metadata > Clean...
Read more >
How to figure out which junk you can remove from URLs - Zapier
If you're unsure, just try out the clean URL by pasting it into a browser. If it works for you, it will work...
Read more >
URL Clean: Clean Google search result URLs
This tool removes the unnecessary parts, leaving the page's original URL. URL copied from Google search results. Clean it!
Read more >
How to make clean URLs - desiquintans.com
This method uses a .htaccess file to tell the server (one running Apache) what to do. The first step is to make a...
Read more >
ENABLE CLEAN URLS IN DRUPAL - Robert Menetray
How to find out if clean Urls are enabled · Open an incognito window and go to the home page of your website....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found