Skip to content

urls with dots are treated as fileNames #454

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

Closed
matanwerbner opened this issue Apr 13, 2016 · 4 comments
Closed

urls with dots are treated as fileNames #454

matanwerbner opened this issue Apr 13, 2016 · 4 comments

Comments

@matanwerbner
Copy link

Hi,

we have urls such as
http://localhost:8080/search/192.168.1.0

on browser refresh, dev server is trying to serve a file, rather then serving the content base.

can you add a flag for ignoring dots in the url? ty

@ChrisJamesC
Copy link

A possible fix is in #303

@ChrisJamesC
Copy link

ChrisJamesC commented Jun 26, 2016

An alternative fix is to replace the historyApiFallback=true line in the server config with:

historyApiFallback: {
    rewrites: [
        {
            from: /^\/search\/.*$/,
            to: function() {
                return 'index.html';
            }
        }
    ]
},

This will make any page with a dot in the /search path to be redirected to index.html (as it should be if it were not considered as a file)
See https://github.com/bripkens/connect-history-api-fallback#rewrites for more info

Documenting this should be enough.

@SpaceK33z
Copy link
Member

@matanwerbner, did the above fix your issue?

@SpaceK33z
Copy link
Member

Closing this issue, since it is out of our control, and connect-history-api-fallback has a config option to fix this (see above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants