Welcome Guest, Not a member yet? Register   Sign In
How can i make Codeigniter allowing subfolders subfolders?
#1

[eluser]Lacsap[/eluser]
Hello,

I have installed CI in root and Wordpress in root/blog.

But I cant open mysite.de/blog without getting a 404 error.

How can i unprotect the blog folder and its subfolders with .htaccess?

My .htaccess on root:
Quote:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mysite\.de$
RewriteRule ^(.*)$ http://www.mysite.de/$1 [L,R=301]
RewriteRule ^home$ / [R=301,L]

#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
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>

I have to say that i dont know what my htaccess file is doing Smile It worked till now.

I googled and tried to add
Code:
RewriteCond $1 !^(index\.php|blog)
but it didnt help me.

Thanks.
#2

[eluser]toopay[/eluser]
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1
#3

[eluser]Lacsap[/eluser]
Adding or replacing this code didnt help me. Could you tell what i've to do with this code?
#4

[eluser]toopay[/eluser]
Show your directory structure...
#5

[eluser]Lacsap[/eluser]
Codeigniter in /root/ and my Wordpress Blog in /root/blog. Do you need more?
#6

[eluser]toopay[/eluser]
:coolhmm: Ok, forget that.

How you access the index of your CodeIgniter App, i mean the fullpath..like 'http://idontknowwhatyourbasepath.com/bla..bla...' which give you welcome page or default controller.
#7

[eluser]Lacsap[/eluser]
just with http://itsanicedaytodaybla.com/index.php Smile
#8

[eluser]toopay[/eluser]
modify your.htaccess to
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* index.php/$1
#9

[eluser]Lacsap[/eluser]
Now opening my CI mainpage not blog/....
But no 404 error
#10

[eluser]toopay[/eluser]
Change the last line, to this
Code:
RewriteRule ^.* index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB