Website redirect help

8 posts Page 1 of 1
Contributors
User avatar
Cheatmasterbw
Coding God
Coding God
Posts: 1506
Joined: Fri Jan 01, 2010 2:30 pm

Website redirect help
Cheatmasterbw
I have a problem with a website...

does anyone know how to redirect from something like this:
Code: Select all
www.website.com/asdf
to this...
Code: Select all
www.website.com/asdf.html
Thanks :D

--edit--

is there a way to make it so when someone types ".../asdf" into the address bar, the webpage shows ".../asdf.html"?
http://www.megaapps.tk/
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Website redirect help
comathi
Well, when you type ".../asdf", the browser will navigate to a folder named "asdf", and if an html file is found (depending on the settings you've set) it will navigate to it. However, if you don't have such a folder, you'll get an error.
User avatar
Cheatmasterbw
Coding God
Coding God
Posts: 1506
Joined: Fri Jan 01, 2010 2:30 pm

Re: Website redirect help
Cheatmasterbw
What settings do I change to make it show the webpage?
http://www.megaapps.tk/
User avatar
MrAksel
C# Coder
C# Coder
Posts: 1758
Joined: Fri Mar 26, 2010 12:27 pm

Re: Website redirect help
MrAksel
I think you just have a file inside the folder, nothing else but having an html file :? I dunno
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;


Over 30 projects with source code!
Please give reputation to helpful members!

Image
Image
User avatar
Cheatmasterbw
Coding God
Coding God
Posts: 1506
Joined: Fri Jan 01, 2010 2:30 pm

Re: Website redirect help
Cheatmasterbw
This is what I get when I do that
Image
http://www.megaapps.tk/
User avatar
Cheatmasterbw
Coding God
Coding God
Posts: 1506
Joined: Fri Jan 01, 2010 2:30 pm

Re: Website redirect help
Cheatmasterbw
I found out how to do it.

You need to make a file named ".htaccess" in the map directory. Inside this file, you have the text:
Code: Select all
DirectoryIndex map.html
http://www.megaapps.tk/
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: Website redirect help
Shim
yah #Cheatmasterbw i have seen .htaccess when i logged into my hosting account . Without .htaccess website doesnt work i had the same problem once .
Find my programs on Softpedia
User avatar
comathi
Coding God
Coding God
Posts: 1242
Joined: Fri Mar 26, 2010 1:59 pm

Re: Website redirect help
comathi
I think it depends on the platform your server is running. I have a Windows server, no .htaccess, but a Web.config file.
8 posts Page 1 of 1
Return to “Tutorials”