apache vraagje

Pagina: 1
Acties:
  • 133 views sinds 30-01-2008
  • Reageer

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 07-06 23:13
Hoe krijg ik voorelkaar dat apache een subdir in mijn webdir gewoon kan openen zonder dat daar een / achter moet?
beetje vaag, maar is ook lastig te omschrijven:

nu:
www.blabla.com/dir/ (voor www.blabla.com/dir/index.html)

wat ik wil:
www.blabla.com/dir (voor www.blabla.com/dir/index.html)

KAn dit?

...


  • Creepy
  • Registratie: Juni 2001
  • Laatst online: 18-08 21:00

Creepy

Tactical Espionage Splatterer

www.apache.org .. daar staat volgens mijn in de FAQ je probleem uitgelegd!

"I had a problem, I solved it with regular expressions. Now I have two problems". That's shows a lack of appreciation for regular expressions: "I know have _star_ problems" --Kevlin Henney


  • Jordi
  • Registratie: Januari 2000
  • Niet online

Jordi

#1#1

Het zal wel niet, maar het zou maar wel.


  • milos
  • Registratie: Juni 2001
  • Laatst online: 23-07 22:23
Volgens mij kun je dat ook oplossen door mod_spelling in te voegen. Deze check misspelled url's en past ze daarna een beetje aan.
als je dan /test opvraagt en dat bestaat niet maar /test/ wel gaat het gewoon goed

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 07-06 23:13
Er stond al
ServerName <mijnIP>

nu heb ik daarvan gemaakt:
ServerName http://<mijnIP>

Maar werkt nog niet.
Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?
When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.
Dit volg ik nog wel, maar dit (wat staat bij ServerName directive) :
ServerName directive
Syntax: ServerName fully-qualified-domain-name
Context: server config, virtual host
Status: core
The ServerName directive sets the hostname of the server; this is used when creating redirection URLs. If it is not specified, then the server attempts to deduce it from its own IP address; however this may not work reliably, or may not return the preferred hostname. For example:

ServerName www.example.com
would be used if the canonical (main) name of the actual machine were simple.example.com.
If you are using name-based virtual hosts, the ServerName inside a <VirtualHost> section specifies what hostname must appear in the request's Host: header to match this virtual host.

...


  • Jordi
  • Registratie: Januari 2000
  • Niet online

Jordi

#1#1

http:// voor ServerName zetten = -1 niet goed :)
ServerNAME, niet ServerIP
je hostname dus...

Het zal wel niet, maar het zou maar wel.


  • Haranaka
  • Registratie: September 2000
  • Laatst online: 07-06 23:13
:'( het is nog niet gelukt.

ServerName flits103-216.flits.rug.nl

...

Pagina: 1