LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2008, 11:47 AM   #1
prasanth_kumar
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
does files with .html extension work on linux server?


i have a website created with pages having .html extensions. i would like to host it on a linux server. do i need to rebuild the web site or can i directly upload it on to a linux server?

Thanks,
Prasanth.
 
Old 12-22-2008, 12:37 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
if the site is entirely static HTML pages it will work perfectly well on a linux web server.
 
Old 12-22-2008, 01:15 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Any web server will serve html. That's what they are designed for.

The extensions that it will serve and parse will only depend on how the web server is configured. 99.99% of the servers are configured to serve files with html/HTML extensions as html, and to use "index.html" or "index.php" as the default nowadays. No admin ever changes that unless it's doing a very odd thing with the server (and in that case s/he probably picked the incorrect tool, since the purpose of html servers is to serve html...).

Most servers will be able to serve additional mime and file types (txt, php, xml, svg...), it all depends on how it was compiled and configured.

In short, if your files are valid html you shouldn't need to change anything, regardless of the host OS.
 
Old 12-22-2008, 06:37 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
FYI, if you created those pages on an MS system, you'll have to run the dos2unix util over them after you've uploaded them. MS and Linux use different line-ending sequences.
 
Old 12-22-2008, 08:53 PM   #5
yzhong
Member
 
Registered: Jun 2007
Location: sydney
Distribution: redhat , ubuntu, centos
Posts: 56

Rep: Reputation: 16
if you already set "upload/download use ascii code" on your upload tools,you don't need to run dos2unix

Last edited by yzhong; 12-22-2008 at 09:01 PM.
 
Old 12-22-2008, 11:11 PM   #6
portamenteff
Member
 
Registered: Feb 2006
Location: Colorado
Distribution: sabayon
Posts: 180
Blog Entries: 1

Rep: Reputation: 36
Another thing to consider, is that ALL your links, and file references must be case sensitive. In a winblows server, they usually ignore case.
example of good html in Linux if the file linked is named Love_Song.mp3:
Code:
<a href="mp3s/Love_Song.mp3">A Love Song</a>
If the file were named 'love_song.mp3' it would not work in linux servers beit apache, lighttpd, or others.
 
Old 12-25-2008, 06:24 AM   #7
prasanth_kumar
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Lot of thanks for the replays. it was of great help!

Regards,
Prasanth
 
Old 12-26-2008, 12:27 AM   #8
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 831

Rep: Reputation: 200Reputation: 200Reputation: 200
Further, please remember that file names in Linux are case sensitive. If you have a link (URL) within a page, the link should have the same capitalisation as the physical linked file.

Eg:
If the physical file is called MYNEXTPAGE.html, the URL in the originating page should be only MYNEXTPAGE.html and cannot be MyNextPage.html, MYNEXTPAGE.HTML or any other capitalisation.

So, it is advisable to check all links once.

End
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wget does not work because of no html files? ufmale Linux - Newbie 1 07-02-2008 11:45 PM
Search & Replace Technique to Fix html HREFs w/o html extension donv2 Linux - Newbie 1 01-30-2007 11:59 PM
converting a doc/ppt Windows files in html files under linux env agrosu Programming 7 02-23-2006 03:07 PM
apache server setup and how to place files in the var/www/html directory dramous Linux - Newbie 7 09-28-2004 04:18 AM


All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration