Welcome Guest, Not a member yet? Register   Sign In
Default Index is only page showing up.
#1

[eluser]thocutt1020[/eluser]
Hi guys,

I'm having a problem trying to port my website to CI2 in that I am experiencing a phenomenon where only the default page index is showing no matter what url goes in.


I have successfully made the switch to Reactor using a 'normal' url, www.ihq.org.au and everything works great.
...But...
I need this to work on my site that hosts multiple sites via sub-domains. This is where I run into a problem...
my website hockeysyte.com, hosts sites like ilha.hockeysyte.com and nzinline.hockeysyte.com

In CI 1.7 I used...
Code:
$config['uri_protocol']    = 'REQUEST_URI';

and my htaccess looks like...
Code:
#<IfModule mod_rewrite.c="">
  Options +FollowSymlinks
  RewriteEngine On
  RewriteBase /

  #Removes access to the system folder by users.
  #Additionally this will allow you to create a System.php controller,
  #previously this would not have been possible.
  #'system' can be replaced if you have renamed your system folder.
  RewriteCond %{REQUEST_URI} ^system.*
  RewriteRule ^(.*)$ /index.php/$1 [L]

  #Checks to see if the user is attempting to access a valid file,
  #such as an image or css document, if this isn't true it sends the
  #request to index.php
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  #This last condition enables access to the images and css folders, and the robots.txt file
  #Submitted by Michael Radlmaier (mradlmaier)
  RewriteCond $1 !^(index\.php|images|robots\.txt|css)
  RewriteRule ^(.*)$ index.php/$1/ [L]
  #RewriteCond %{QUERY_STRING} !vardump
  #RewriteRule ^(.*)$ /index.php/$1?vardump&thereq;=%{THE_REQUEST}&reqhost;=%{HTTP_HOST}&rem;_host=%{REMOTE_HOST} [R=301,L,QSA]

#</IfModule>

<IfModule !mod_rewrite.c="">
  # If we don't have mod_rewrite installed, all 404's
  # can be sent to indexci.php, and everything works as normal.
  # Submitted by: ElliotHaughin

  #ErrorDocument 404 /index.php
  ErrorDocument 404 /system/application/errors/error_404.php
</IfModule>


These two settings work great with 1.7 and when I've upgraded to CI 2 with a "normal" url. But when I try to use this with my subdomain setup in CI2.0, no matter what codeigniter URL I put in, I get the default page index.

/xsyte/index - index as expected.
/xsyte/news - index!
/xadmin - index!
etc..

I suspect the problem is the REQUEST_URI protocol, but I'm really not sure at this point and I've been forced to go back to CI 1.7
Anyone know what I can do here to get CI 2 working in this environ?

Thanks heaps for any ideas!!
Cheers,
Tracy
#2

[eluser]thocutt1020[/eluser]
I got the latest Reactor 2.01 Tip and everything is working fine now! YES!!




Theme © iAndrew 2016 - Forum software by © MyBB