• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with mod rewrite and CI

#1
[eluser]Waiel[/eluser]
Hi.
i finished my first site based on CI FW and i really love how easy it made my life to finish such project.

The only problem im facing is with the virtual sub domains for the members in the site.

in order to have this i use mod_Rewrite to enable that.
my domain name is something like my-site.com and i made my Mod_rewrite to be like this

Code:
RewriteEngine on
##hide Index.php
RewriteCond $1 !^(index\.php|public|tmp|images|css|javascript|upload|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

##Subdomains redirect
RewriteCond %{HTTP_HOST} ^((.+)\.)?((my-site)\.(com))$ [NC]
RewriteCond $1 !^(index\.php|public|tmp|images|css|www|javascript|upload|robots\.txt)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/index.php/groups/%1 [QSA,L]


basicly each subdomain represents a group and it should point it to http://www.my-site.com/index.php/groups/groupname ..

so if the groupname is Markgroup it should point to http://www.my-site.com/index.php/groups/markgroup


the rewrite code i wrote doesn't work
it will only point to the main page and nothing else ..

Anyone can tell me what i'm doing wrong ..?


Thanks


Messages In This Thread
help with mod rewrite and CI - by El Forum - 07-05-2007, 08:12 AM
help with mod rewrite and CI - by El Forum - 07-05-2007, 04:28 PM
help with mod rewrite and CI - by El Forum - 08-31-2007, 06:03 AM
help with mod rewrite and CI - by El Forum - 08-31-2007, 08:40 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.