Welcome Guest, Not a member yet? Register   Sign In
.htaccess removing index.php and creating a subdomain
#1

[eluser]Jesse Schutt[/eluser]
Hello all!

So I'm running a CI installation in a subdomain and I'm running into some problems.

I have an .htaccess on the root level of the site (which is an ExpressionEngine site) that is setting up the subdomain as well as removing index.php from the main EE site. Here is that file - I know it isn't very good:
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^site.org [NC]
RewriteRule ^(.*)$ http://www.site.org/$1 [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

RewriteBase /
RewriteCond %{HTTP_HOST} ^register.site.org [NC]
RewriteCond %{REQUEST_FILENAME} !register/
RewriteRule ^(.*)$ register/$1 [L]

Now, I'm trying to remove the index.php file in the subdirectory, which is visited by going to register.site.org. This is the .htaccess there:
Code:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|assets)
RewriteRule ^(.*)$ /index.php/$1 [L]

That is working fine for removing the index.php, however it is screwing up any calls to the "assets" directory. In fact, it is attempting to call the file from www.site.org/assets instead of register.site.org/assets (which is really www.site.org/register/assets).

I've blown the better half of a day trying to get this to work! I'd love if someone could see something I'm missing!




Theme © iAndrew 2016 - Forum software by © MyBB