opened
Opfour
username_0
Hi, 


Checked all of the normal settings I would for this redirect type of error... 
This page isn’t working r8s.io redirected you too many times.

a curl -svILk http://r8s.io/ shows the same redirect error

< HTTP/1.1 302 Found
HTTP/1.1 302 Found
< Date: Fri, 05 Apr 2019 23:18:33 GMT
Date: Fri, 05 Apr 2019 23:18:33 GMT
< Server: Apache
Server: Apache
< Location: http://r8s.io
Location: http://r8s.io
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8

waterfall in chrome: 
![Screenshot from 2019-04-05 19-12-56](https://user-images.githubusercontent.com/5208558/55660937-dd5d2e00-57d6-11e9-8592-acdcd0e7eb22.png)

apache mod_rewrite on, using php 7.0-7.2, maria 10.3... 

.htaccess looks correct
  1 
  2 RewriteEngine On
  3 RewriteCond %{REQUEST_FILENAME} !-d
  4 RewriteCond %{REQUEST_FILENAME} !-f
  5 RewriteRule ^.+$ index.php [NC,L]
  6 

it is a cpanel box so not sure if thats relevant or not... 

just a heads up...
http://r8s.io throws a 302 redirect
issue
created
tylerhall
username_1
Thanks for reporting that @username_0.

Can you tell me what your $url_blank variable is set to?
comment
created
tylerhall
username_1
Ah. That’s the reason. I just tested with my own installation and setting it to itself WITHOUT a trailing slash causes the redirect loop.

You can change it to one of these two options:

    $url_blank = '';

-or-

    $url_blank = 'http://r8s.io/';

That should fix the problem.

I'll update the script to always add a trailing slash if one is not provided.
comment
created
Opfour
username_0
awesome; removed the url from that line ($url_blank = '';)
but now all I get is "Nothing to do." ?

![Screenshot from 2019-04-09 12-40-51](https://user-images.githubusercontent.com/5208558/55818506-c3686780-5ac4-11e9-9a67-0125ed3ab915.png)
comment
created
Opfour
username_0
On a positive note, both are returning 200 responses :D
comment
created
tylerhall
username_1
`but now all I get is "Nothing to do." ?`

@username_0 That's the correct behavior. If you just go to the home page, it does nothing. (That's what the `$url_blank` variable is for - to redirect people if they try to go to the home page for some reason.) 

You need to perform an action by following the example URLs listed in the [README](https://github.com/username_1/simple-url-shortener/blob/master/README.md). You can shorten a new link or view your stats page for example.
comment
created
Opfour
username_0
gotcha: 
To create a new short link, just append the full URL you want to shorten to the end of the domain name you installed this project onto. For example, if your shortening service was hosted at https://example.com and you want to shorten the URL https://some-website.com, go to https://example.com/http://somewebsite.com. If all goes well, a plain-text shortened URL will be displayed. Visiting that shortened URL will redirect you to the original URL.
has anyone written a chrome plugin for this yet by chance?
comment
created
Opfour
username_0
tried https://r8s.io/https://google.com
blank page :(
comment
created
Opfour
username_0
ok got it... had to clear the $pw_create = ''; entry I setup
comment
created
tylerhall
username_1
Great! I just tested your URL and was able to shorten a link and then visit it.

I would suggest setting up a simple, easy to remember password just so other people don't start using your website as a spam service.
comment
closed
tylerhall
username_1
issue