Welcome Guest, Not a member yet? Register   Sign In
single system folder help
#11

[eluser]pwfraley[/eluser]
[quote author="sasori" date="1264447140"][quote author="pwfraley" date="1264446735"]Hi I am pretty new to CI,

so I might be totally of here, but did you try:

http://apps/firstapp/

or

http://apps/firstapp/CONTROLLERNAME/

or

http://apps/firstapp/CONTROLLER/FUNCTIONNAME/

also it seems like you are rewriting:

http://apps/firstapp/CONTROLLERNAME/

to

http://apps/index.php/CONTROLLERNAME/

in your htaccess file, though I might be wrong here (use lighttpd not apache myself) ...[/quote]

this works
Code:
http://apps/firstapp/index.php/CONTROLLERNAME

this doesn't
Code:
http://apps/firstapp/CONTROLLERNAME

I followed what was written from the manual about the .htaccess stuff to get
rid of the "index.php" on the url.
I even tried the allowoverride in the virtual host file
still no luck.
I just wanna get rid of the "index.php"[/quote]

I guess then it must be the rewrite rule, did you check the logs/error log of your apache, should be in a logfolder under your XAMPP folder somewhere (called error.log or something).

Also please try:
Code:
http://apps/firstapp/CONTROLLERNAME/
Notice the slash at the end of CONTROLLERNAME

Maybe you could also try a different approach, because you also have your CI System folder in your document root which ist not a good Idea.

So instead of putting your CI and Apps folder in your htdocs folder you could create this:
Code:
C:\srv
      \www
            \lib
                  \CodeIgniterSystemFolder
            \vhosts
                  \apps
                        \htdocs
                              \index.php # Index of first app
                              \blog.php  # Index of second app (just not named index)
                        \lib
                              \firstapp
                                    \config
                                    \models
Then in the index.php file set your system folder and application folder:
Code:
$system_folder = "C:\srv\www\CodeIgniterSystemFolder";
$application_folder = "..\lib\firstapp";
Now you need to change your virtual host settings:
Code:
<VirtualHost *:80>
      DocumentRoot "C:/srv/www/vhosts/apps/htdocs/"
      ServerName apps
      ServerAlias apps apps.com
      <Directory "C:/srv/www/vhosts/apps/htdocs/">
            AllowOverride All
            Order allow,deny
            Allow from all
      </Directory>
</VirtualHost>
Now I know this is all a bit lengthy, but this way your index.php file will be in the document root and your php code is outside the document root (much safer setup). Now try if the rewrite rules work. Also check in the apache config that the rewrite module is enabled.
#12

[eluser]pwfraley[/eluser]
Just found this in the Forum:

http://ellislab.com/forums/viewthread/142595/

it seems that the RewiteCondition expects the index.php file to be at the top of the document root and not in a subfolder. So you have to change a few things around (as described in the post) or setup your vortiual host differently.
#13

[eluser]Joshua Logsdon[/eluser]
And that's why I'm thinking you need "RewriteBase /firstapp/" in there somewhere or take out the first slash in your RewriteRule so it's relative: RewriteRule ^(.*)$ index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB