View previous topic :: View next topic
Author
Message
unLog!c Joined: 27 May 2004 Posts: 185 Location: Osijek
Posted: 25.02.2006 14:50 Post subject: MOD_REWRITE, fake subdomains
Dakle, želio bih rewriteati nesto.domena.com
na domena.com/nesto, a u slučaju da imam recimo:
nesto.domena.com/folder
da to rewritea na domena.com/nesto/folder
Imam trenutno ovo:
Code: # Rewrite subdomain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.parkour\.hr(:80)?<>/([^/]*) [NC]
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
RewriteRule ^(.*) /%1/$1 [L]
ali to ne radi....
jel ja trebam imati na hostu nešto posebno da bi mogao rewriteati domene ili to mogu samo s .htaccess fileom raditi?
_________________ Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
gog Joined: 18 Jun 2004 Posts: 679 Location: zagreb
Posted: 25.02.2006 18:59 Post subject:
Pa moraš imati mod_rewrite uključen....
Back to top
unLog!c Joined: 27 May 2004 Posts: 185 Location: Osijek
Posted: 25.02.2006 19:06 Post subject:
Pa uključen je i koristim ga normalno za site, ali mislim uz taj "normalan" način imati i ovaj sa pod domenama...
evo cjeli htaccess file:
Code: DirectoryIndex
RewriteEngine on
####################################################################
#site redirect
RedirectMatch temp ^/$ http://parkour.hr/index.html
#site redirect /
####################################################################
#site exclude rewrite
RewriteRule ^(parkour.css|parkour.css) - [L]
RewriteRule ^(index.html|index.html) - [L]
RewriteRule ^(images|images/(.*)) - [L]
RewriteRule ^(include|include/(.*)) - [L]
RewriteRule ^(videos|videos/(.*)) - [L]
RewriteRule ^(board|board/) - [L]
RewriteRule ^(bulletproof|bulletproof/(.*)) - [L]
#site exclude rewrite /
####################################################################
#site rewrite
RewriteRule ^(.*)?$ index.php [nc]
####################################################################
# Rewrite subdomain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST}<>%{REQUEST_URI} ^([^.]+)\.parkour\.hr(:80)?<>/([^/]*) [NC]
RewriteCond %1<>%3 !^(.*)<>\1$ [NC]
RewriteRule ^(.*) /%1/$1 [L]
####################################################################
_________________ Why dont you go out and play hide and go fuck your self like all other NORMAL kids?
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Powered by phpBB © 2001, 2005 phpBB Group