Title: gpx file not loading
Last modified: February 4, 2021

---

# gpx file not loading

 *  [flavio](https://wordpress.org/support/users/finegiro/)
 * (@finegiro)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/)
 * 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](https://humanwebs.com/wp-content/uploads/2021/02/C.3-Platano.gpx)
   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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14008050)
 * 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 5 years, 4 months ago by [hupe13](https://wordpress.org/support/users/hupe13/).
      Reason: copy paste error
    -  This reply was modified 5 years, 4 months ago by [hupe13](https://wordpress.org/support/users/hupe13/).
 *  Thread Starter [flavio](https://wordpress.org/support/users/finegiro/)
 * (@finegiro)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14008625)
 * 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](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14008798)
 * How did you add the MIME type?
 *     ```
       AddType application/gpx+xml gpx
       RewriteRule .*\.gpx$ - [L,T=application/gpx+xml]
       ```
   
 *  Thread Starter [flavio](https://wordpress.org/support/users/finegiro/)
 * (@finegiro)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14008921)
 * Yes, I wrote exactly that at the end of .htaccess, is that correct?
 *  Plugin Contributor [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14009061)
 * 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](https://wordpress.org/support/users/finegiro/)
 * (@finegiro)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14009089)
 * Thanks again hupe13, I did that but.. check it out, same result.. @#¢$%”!
    Also
   asked the hosting company support but no help..
 *  Plugin Contributor [hupe13](https://wordpress.org/support/users/hupe13/)
 * (@hupe13)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14009185)
 * 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](https://wordpress.org/support/users/finegiro/)
 * (@finegiro)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14011293)
 * 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.

 * ![](https://ps.w.org/leaflet-map/assets/icon-256x256.png?rev=1693083)
 * [Leaflet Map](https://wordpress.org/plugins/leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-map/reviews/)

## Tags

 * [gpx](https://wordpress.org/support/topic-tag/gpx/)

 * 8 replies
 * 2 participants
 * Last reply from: [flavio](https://wordpress.org/support/users/finegiro/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/gpx-file-not-loading/#post-14011293)
 * Status: not resolved