URL redirect with files hosted (for short URL service)

187 views Asked by At

I have a URL with YOURLS URL shortening hosted on it. Currently when you visit the site you get a file list of all the YOURLS files (which is not ideal).

I would like to do a redirect so if people visit the site address they can be redirected elsewhere (as this won't be a public service).

I am hosted with Dreamhost and they already have a A-name record for the subdomain 'WWW' so I cannot add another A-name record for this. Also Dreamhost have advised that I could use DNS only and remove the hosting but obviously I need the hosting to host the YOURLS files. I have given up on their support team so hopefully someone here can help me!

1

There are 1 answers

0
Loebl On BEST ANSWER

You could use a .htaccess file to suit your needs.

You can use it to deny directory listing, see the answer here. It will give visitors to www.yourdomain.whatever an error (access denied IIRC)

Or if you really to redirect them somewhere else you can try if this answer is helping you. Note that this redirects the user from one selected page to another.