Welcome Guest, Not a member yet? Register   Sign In
another CI in subdirectory?
#1

[eluser]JackMeUp[/eluser]
Hello,

I have a CI site set up to use urls like:

- www.dn.com/
- www.dn.com/home
- www.dn.com/about

Now I want to add a working copy of the site under folder /testnew

- www.dn.com/testnew/about , etc...

This seems to be working for the home page only. Whenever I click a link, for example to
www.dn.com/testnew/contact, it loads www.dn.com/contact instead. I don't understand why.
Does the answer lie in .htaccess, or routes.php? And in which CI instance?
Here is my .htaccess

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dn.ca
RewriteRule (.*) http://www.dn.ca/$1 [R=301,L]

<IfModule mod_rewrite.c>
    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]
</IfModule>

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

    ErrorDocument 404 /index.php
</IfModule>

Thanks for any tips.

Jack.


Messages In This Thread
another CI in subdirectory? - by El Forum - 05-10-2010, 12:59 PM
another CI in subdirectory? - by El Forum - 05-10-2010, 01:23 PM
another CI in subdirectory? - by El Forum - 05-10-2010, 01:27 PM
another CI in subdirectory? - by El Forum - 05-10-2010, 02:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB