Jag är ute efter precis detta men får det ej att fungera.
Citat:
Ursprungligen postat av VirtualHost
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost fotoblogg.me:80>
DocumentRoot /var/www/fotoblogg.me
ServerName www.fotoblogg.me
ServerAlias www.fotoblogg.me fotoblogg.me *.fotoblogg.me
</VirtualHost>
|
Citat:
Ursprungligen postat av .htaccess
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www.domain.se$ [NC]
RewriteCond %{HTTP_HOST} ^( www.)?([a-z0-9-]+).domain.se [NC]
RewriteRule ^([0-9]+)$ ?nick=%2&id=$1 [NC,L]
|
Citat:
Ursprungligen postat av index.php
<?php
print 'Nick: ' . $_GET['nick'] . '<br />';
print 'ID: ' . $_GET['id'];
?>
|
http://hejsan.fotoblogg.me/123