Skip to content
← Back to Community
How to Make Your URL's Look Good (.../index.html to .../index)
Profile icon
AnthonyMouse

For this, my example URL is gonna be website.com/branch, so beware.

I am gonna teach you how to make your URL's look good.

Every time you create a new repl, you have a starter folder, index.html, which you can't delete. In the head, put this code:

<script src="PATH/TO/FILE" type="text/html"></script>

Then type whatever code in. It will not have the automated suggestions or even the colors,

<h1>Hello World</h1> <p>Hello!!!</p>

but it will work.

Upvote if you liked it!

Voters
Profile icon
AnthonyMouse
Comments
hotnewtop
Profile icon
Whacko

You don't even need the type="text/html". Repl.it automatically knows what language it is when you add an html code.

Profile icon
SixBeeps

The industry standard way is to just use a server framework like Node or Django but this is interesting, I'll have to mess with it.

Profile icon
AnthonyMouse

I never knew that, how cool! @SixBeeps

Profile icon
Battledash2

Hey! Can you explain how to use it?

<head><script type="text/html"> <h1>Hello, World!</h1> </script> <!-- You don't have to put defer. --> <script defer src="folder/branch"></script></head>
file.html:5 GET https://elm-test.battledash2.repl.co/folder/branch net::ERR_ABORTED 404

@EitanAlperstein

Profile icon
AnthonyMouse

Let me update my post. I did something wrong. @Battledash2

Profile icon
Battledash2
Profile icon
Battledash2

Uhh still doesn't do anything..

index.html

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>repl.it</title> <link href="style.css" rel="stylesheet" type="text/css" /> <script src="main.js" type="text/html"></script> </head> <body> <script src="script.js"></script> </body> </html>

main.js

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> asdfs </body> </html>

@EitanAlperstein

Profile icon
AnthonyMouse

That's because it's .js not .html @Battledash2

Profile icon
Battledash2

i tried that first @EitanAlperstein

Profile icon
AnthonyMouse

You should have a file with no extension and then add a script tag from index.html with src to your file path and type to text/html. @Battledash2

Profile icon
Battledash2
Profile icon
Battledash2
Profile icon
Battledash2

i dont understand

can you make a repl with how to do it?

Here's My Current Code/Files @EitanAlperstein

Profile icon
Battledash2

im gonna try to do that but i dont fully understand @EitanAlperstein

Profile icon
Battledash2

still didnt work @Battledash2

Profile icon
AnthonyMouse

Just a sec here. I'm gonna make a repl to show you. @Battledash2

Profile icon
Battledash2
Profile icon
Battledash2
Profile icon
AnthonyMouse

Go to this link: @Battledash2

Profile icon
Battledash2
Profile icon
AnthonyMouse
Profile icon
Battledash2

tbh that's cool. you can make js automatically redirect you & stuff. And you should probably make a copy with .html for 2 rsns:

Profile icon
AnthonyMouse

Sorry it took some much time to respond, repl is loading lazily. I definitely agree. Also, would you like to join my team where we make coding languages? https://repl.it/teams/join/zzdmvixfrdbulxlpungqqnaeictpczpm-TeamCL press the link ONLY if you want to join. @Battledash2

Profile icon
Battledash2
Profile icon
Battledash2

i only do Web Development tho @EitanAlperstein

Profile icon
Battledash2

sure you want me to join? @EitanAlperstein

Profile icon
AnthonyMouse

Yeah you can work on our website with me. If you want. @Battledash2

Profile icon
AnthonyMouse

If you want to. @Battledash2

Profile icon
AnthonyMouse

It would be great. @Battledash2

Profile icon
Battledash2
Profile icon
AnthonyMouse

Just press the link. @Battledash2

Profile icon
Battledash2

You aswell end your dumb little project aye? I QUIT @EitanAlperstein

Profile icon
Battledash2

They definitely don't swear and don't call me five year olds. By the way I removed everything I added to the thing, I'll give it back if they get kicked or something which I doubt is happening. IF YOU USE ANY OF MY CODES..... Say hello to Jail and BANS :) @EitanAlperstein

Profile icon
CodeLongAndPros

@Battledash2 You’re one to talk

Profile icon
SixBeeps

I'll give it back

You do know that Repl History is a thing right? @Battledash2

Profile icon
AnthonyMouse

He deleted the files, not the code. @SixBeeps

Profile icon
AnthonyMouse

You can't retrieve files, as I know it. @SixBeeps

Profile icon
SixBeeps

@EitanAlperstein You can, just re-create the file and look at its history

Profile icon
AnthonyMouse

Turns out he deleted a trash file! :D @SixBeeps

Profile icon
CodeLongAndPros

@EitanAlperstein Just so you know, Battledash2 has been banned.

Profile icon
AnthonyMouse

really??!!?!?!? who reported him? @CodeLongAndPros

Profile icon
CodeLongAndPros
Profile icon
AnthonyMouse
Profile icon
AnthonyMouse
Profile icon
CodeLongAndPros

@EitanAlperstein Yeah, no problem, and the team should be looking into an IP ban.

Profile icon
AnthonyMouse

What’s that? @CodeLongAndPros

Profile icon
SixBeeps

@EitanAlperstein Even if you make a new account, you still won't be able to bypass the ban unless you use another computer.

Profile icon
CodeLongAndPros

@SixBeeps Or a vpn

Profile icon
AnthonyMouse

What is a vpn? @CodeLongAndPros

Profile icon
SixBeeps
Profile icon
AnthonyMouse
Profile icon
karenberys

@Battledash2 I have not thought about such a solution to the problem before, thank you

Profile icon
alexstrem

@Battledash2 Thus, the link looks better than originally. It seems that the direct link on the site looks a little raw and not quite appropriate and not as good as just text with an active link already inside. I like services like https://transformagency.com/ because their promotion is not only about leaving an active link, but they comprehensively approach advertising and each project individually. This requires a professional approach, and apparently, now many services work like this because they realized that customers need quality and not quantity