LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-01-2006, 12:27 AM   #1
rolandw
LQ Newbie
 
Registered: Sep 2003
Location: London
Distribution: RedHat, SuSE
Posts: 10

Rep: Reputation: 0
Apache 1.3: mydomain.com/mypage -> mydomain.com/mypage.html


I am looking for a generic way to redirect URL requests missing a file extension to serve the same page with a default file extension. Thus
http://www.mydomain.com/mypage
would serve
http://www.mydomain.com/mypage.html
I can do this on an instance by instance manner using "redirect seeother" lines in httpd.cong but I'd like to be doing it automatically so I can just forget about the issue.

Any ideas, most welcome so TIA
 
Old 11-01-2006, 02:27 AM   #2
cdhgee
Member
 
Registered: Oct 2003
Location: St Paul, MN
Distribution: Fedora 8, Fedora 9
Posts: 513

Rep: Reputation: 30
You should be able to do this with mod_rewrite. mod_rewrite basically rewrites requested URLs so you can serve a different page to the one requested, but with the benefit of not having to issue an HTTP redirect, thus saving time, bandwidth etc.

See the mod_rewrite documentation for details.
 
  


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
forcing www.mydomain.com to just mydomain.com sneakyimp Linux - Software 4 07-24-2006 02:23 PM
localhost VS mydomain.net thisObject Linux - Software 5 05-07-2006 07:56 PM
can't access www.mydomain.net thisObject Linux - Software 12 04-17-2006 05:47 PM
Ping mydomain.com bulzbb Linux - Networking 7 03-16-2004 05:42 AM
mail.mydomain.com does not work saravanan1979 Linux - Networking 8 02-01-2002 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:37 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
Open Source Consulting | Domain Registration