• Hi there, thanks for the great plugin!

    I know this question has arise and been solved in two other tickets but I can’t get gpx files hosted in my own domain to load properly, instead I get a map with the default location.

    I tried:
    – adding the gpx MIME type
    – put this code in .htaccess: RewriteRule .*\.gpx$ – [L,T=application/gpx+xml]
    – put this code in .htaccess: Access-Control-Allow-Origin: *

    Here is the LINK to the gpx.

    I also noticed that my gpx file open in the browser as an xml file.. while the gpx files that works are getting downloaded by the browser.. I’m stuck there.

    Maybe I’m not understanding the solutions or doing something wrong, thanks for helping!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor hupe13

    (@hupe13)

    Please open the developer console / tools in your browser and search network. The link above is loading as content-type “text/plain”. It must be “application/gpx+xml”, so your .htaccess isn’t correct.
    I have in my .htaccess:
    RewriteRule .*\.gpx$ - [L,T=application/gpx+xml]

    P.S.But this do you have also.

    • This reply was modified 4 years, 1 month ago by hupe13. Reason: copy paste error
    • This reply was modified 4 years, 1 month ago by hupe13.
    Thread Starter flavio

    (@finegiro)

    Thank you hupe13!
    Yes, well, I’m trying your code but nothing change, the .gpx file is still served as “text/plain” (good hint using the developer console btw, thanks).

    Any other suggestion?

    Plugin Contributor hupe13

    (@hupe13)

    How did you add the MIME type?

    AddType application/gpx+xml gpx
    RewriteRule .*\.gpx$ - [L,T=application/gpx+xml]
    Thread Starter flavio

    (@finegiro)

    Yes, I wrote exactly that at the end of .htaccess, is that correct?

    Plugin Contributor hupe13

    (@hupe13)

    Put these lines before the WordPress configuration lines:

    AddType application/gpx+xml gpx
    RewriteRule .*\.gpx$ - [L,T=application/gpx+xml]
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    etc....
    Thread Starter flavio

    (@finegiro)

    Thanks again hupe13, I did that but.. check it out, same result.. @#¢$%”!
    Also asked the hosting company support but no help..

    Plugin Contributor hupe13

    (@hupe13)

    Maybe your webhosting company doesn’t allow this.
    Or there is some error in your .htaccess, e.g. the order of rules aren’t right.
    Or there is a .htacces in the wp-content/uploads-directory.
    Or … ?

    Thread Starter flavio

    (@finegiro)

    The Website is hosted on Hostinger, I’ll ask them again, maybe you guys have experience with their servers?

    .htaccess seems right, I only added the lines you suggested

    Can’t find any other .htaccess in my web folder and subfolder

    Thanks for helping, keep looking for a solution, this is quite annoying

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘gpx file not loading’ is closed to new replies.