# Trying curl xput, receiving http 301, nothing putted :(

**URL:** <https://discuss.elastic.co/t/trying-curl-xput-receiving-http-301-nothing-putted/10946>\
**Category:** Elasticsearch\
**Created:** [February 28, 2013, 8:42am UTC](https://discuss.elastic.co/t/trying-curl-xput-receiving-http-301-nothing-putted/10946 "2013-02-28T08:42:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelbahr](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@michaelbahr](https://discuss.elastic.co/u/michaelbahr)\
**Post date:** [February 28, 2013, 8:42am UTC](https://discuss.elastic.co/t/trying-curl-xput-receiving-http-301-nothing-putted/10946/1 "2013-02-28T08:42:04Z")

</div>

Hey guys,

im new to Elasticsearch and tried the guide [http://www.elasticsearchtutorial.com/elasticsearch-in-5-minutes.html](http://www.elasticsearchtutorial.com/elasticsearch-in-5-minutes.html)

Everything went fine until i tried this command  
curl -XPUT '[http://localhost:9200/blog/user/dilbert](http://localhost:9200/blog/user/dilbert)' -d '{ "name" : "Dilbert Brown" }'  
expected was:  
{"ok":true,"\_index":"blog","\_type":"post","\_id":"1","\_version":1}  
but received was a redirection header. -v shows a moved permanently error.  
curl -XPUT '[http://localhost:9200/blog/user/dilbert](http://localhost:9200/blog/user/dilbert)' -vd '{ "name" : "Dilbert Brown" }'

- About to connect() to proxy proxy.[...].de port 8080
- Trying [my ip].. connected
- Connected to proxy.[...].de ([my ip]) port 8080
- Proxy auth using Basic with user '[some user]'

> PUT [http://localhost:9200/blog/user/dilbert](http://localhost:9200/blog/user/dilbert) HTTP/1.1  
> Proxy-Authorization: Basic dHptOnRhbmdvITA1  
> User-Agent: curl/7.15.5 (x86\_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5  
> Host: localhost:9200  
> Pragma: no-cache  
> Accept: _/_  
> Proxy-Connection: Keep-Alive  
> Content-Length: 28  
> Content-Type: application/x-www-form-urlencoded
> 
> { "name" : "Dilbert Brown" }HTTP/1.1 301 Moved Permanently  
> \< Server: BlueCoat-Security-Appliance  
> \< Location:http://[my ip]  
> \< Connection: Close

Redirection
# Redirect
\* Closing connection #0

as you may already have noticed im using redhat enterprise edition. elasticsearch version is 0.20.5. java is version 7, also tried with version 6. elasticsearch started successfully. the folders (blog/user blog/post) bot exist and rights are at 777. i also checked the folders content (even hidden files).. nothing.

so.. what am i doing wrong or where is the problem that i have to fix to get to the wanted result?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:49am UTC](https://discuss.elastic.co/t/trying-curl-xput-receiving-http-301-nothing-putted/10946/2 "2017-07-06T02:49:04Z")

</div>


