

Anmelde-Formular

strohhalm.org / Archiv / Server & Hardware / Eintrag lesen
hobbes 24. November 2004, 17:28
Hi,
unter
http://example.com/~hobbes/
erreicht man
/home/hobbes/public_html/
Soweit so schön.
irgendwie kann man die tilde loswerden, mit mod_rewrite, sodass es reicht,
http://example.com/hobbes/
aufzurufen, oder eben
http://example.com/hobbes/foo/bar.html
statt
http://example.com/~hobbes/foo/bar.html
Ich steh beim googlen gerade auf dem Schlauch, und bin mit der rewrite-syntax noch nicht richtig fit. Wer weiß mehr?
Schöne Grüße und thanx in advance
hobbes
bananajoe 24. November 2004, 22:33
die antwort dürftest du hier finden:
http://httpd.apache.org/docs/urlmapping.html#user
Some people find the "~" symbol (which is often encoded on the web as %7e) to be awkward and prefer to use an alternate string to represent user directories. This functionality is not supported by mod_userdir. However, if users' home directories are structured in a regular way, then it is possible to use the AliasMatch directive to achieve the desired effect. For example, to make
http://www.example.com/upages/user/file.html map to /home/user/public_html/file.html, use the following AliasMatch directive:
AliasMatch ^/upages/([^/]*)/?(.*) /home/$1/public_html/$2
B
hobbes 25. November 2004, 14:57
Merci bananajoe :-)
(c) 2002 - 2013 strohhalm.org Community.Server powered by Manitu.Software powered by Mathias Bank
Impressum + Team.Datenschutz