Welcome Guest, Not a member yet? Register   Sign In
Rewrite a subdomain
#1

[eluser]Flak[/eluser]
I'm playing but can't make it work.

I have code igniter on subdirectory of a subdomain

ci.domain.com/ci/index.php/welcome


I want to rewrite to ci.domain.com/welcome

So when a user can go via ci.domain.com/welcome

any idea?

thanks
#2

[eluser]Flak[/eluser]
This is a piece of code that I am rolling:

____
Code:
<IfModule mod_rewrite.c>

# handle domain root and skip subfolders
RewriteCond %{HTTP_HOST} ci.domain.com
RewriteCond %{REQUEST_URI} !^/ci
RewriteCond %{REQUEST_URI} \..+$
RewriteRule ^(.*)$ ci/$1 [L]

# handle files in subfolders
RewriteCond %{HTTP_HOST} ci.domain.com
RewriteCond %{REQUEST_URI} !^/ci
RewriteRule ^(.*)$ ci/$1/ [L]
</IfModule>
____




Theme © iAndrew 2016 - Forum software by © MyBB