Welcome Guest, Not a member yet? Register   Sign In
plz help me~ sub domain and mod_rewrite problem~
#1

[eluser]Unknown[/eluser]
HI ~ all...

i have alwayss some problem~

but this's problem very difficult ~

plz help~ CI families~

OK.. my question is,...

i want this url
ex)

http://ID.site.com -> http://www.site.com/myphoto/ID

myphoto is controller... ID is params

how to set .htaccess...



i now..
RewriteCond $1 !^(index\.php|css|js|inc|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*)$ index.php/$1 [L]


#RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
#RewriteRule ^([^.]+)\.site\.com(.*) /var/www/html/index.php?c=myphoto&m=allphotos&user;_id=$1


plz help me~

THx..All..
#2

[eluser]alexsancho[/eluser]
You can try this,

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} !^w{3}\. [NC]
RewriteCond %{REQUEST_URI} !^/myphoto/ [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com$ [NC]
RewriteRule ^.*$ http://www.site.com/myphoto/$1 [L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Untested, but should work
#3

[eluser]Crimp[/eluser]
이 문제는 IQ 153이상인 사람만이 풀 수 있습니다. ;-)




Theme © iAndrew 2016 - Forum software by © MyBB