Welcome Guest, Not a member yet? Register   Sign In
suggestion for best htaccess
#11

[eluser]hcvitto[/eluser]
my app is in the httdocs folder and contains the system/application folders like the in default CI download.

mmh, weird but now it only works with the index.php/rest_of_the_url! and if i don't write the index.php/rest_of_the_url i got a 500 Internal Server Error.

did you
$config['index_page'] = "";
in the config file?
#12

[eluser]drewbee[/eluser]
Ok, from what you described earlier it sounded like you had it set in a sub folder.

Replace the very last line of the htaccess file with:
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
#13

[eluser]hcvitto[/eluser]
good morning

weekend has gone, problem remains Smile.

drewbee: i used your htacces and still it works for the first level but i can't get rid of index.php in this type of url

localhost/my_app/index.php/admin/login

where admin is the folder, and login the controller..

i'm going crazy now..
#14

[eluser]drewbee[/eluser]
Hmm...

My first suggestion is to check your URI Protocol setting in the config file. There are suggested values with the configuration file. I know I had to change this on one of my servers due to not supporting the PATH_INFO file.

However, my symptoms were different as it would only display the default controller.

One other thing to check is the index_page configuration item. We may need to force ? onto the end of the url's automatically:

Code:
//change this
$config['index_page'] = "index.php";

// to this
$config['index_page'] = "index.php?";

We will get their yet!
#15

[eluser]hcvitto[/eluser]
hi drewbee
i really appreciate your effort..but it still doesn't work Sad

This is the error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.


I wonder if it is just an htaccess extra command that is needed..or i'm just dumbSmile
#16

[eluser]drewbee[/eluser]
There is definitely something wrong with the htaccess file.

Can you copy exactly what your htaccess file is right now to me?


Edit: Also, if someone else has an idea, please chime in!! lol.
#17

[eluser]hcvitto[/eluser]
here's the dog!!

Options +Indexes
Options +FollowSymLinks

# Set the default file for indexes
DirectoryIndex index.php


RewriteEngine on

# This will make the site only accessible without the "www."
# (which will keep the subdomain-sensive config file happy)
# If you want the site to be accessed WITH the "www."
# comment-out the following two lines.
# RewriteCond %{HTTP_HOST} ^www\.site\.com$ [NC]
# RewriteRule ^(.*)$ http://site.com/$1 [L,R=301]

# If a controler can't be found - then issue a 404 error from PHP
# Error messages (via the "error" plugin)
# ErrorDocument 403 /index.php/403/
# ErrorDocument 404 /index.php/404/
# ErrorDocument 500 /index.php/500/

# You can also uncomment this if you know the IP:
#Deny from 192.168.1.1

# If the file is NOT the index.php file
RewriteCond %{REQUEST_FILENAME} !index.php

# If the file/dir is NOT real go to index
RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app_labitta/index.php/$1 [QSA,L]

and here's the map of my app

http://www.solospartiti.it/img/mappa.jpg

who's gonna win the next round?Wink
#18

[eluser]Onur Özgür ÖZKAN[/eluser]
I have also the some problem but a little difrent, our project continues working with 500 Internal server errors. You can check with firebug on www.paperobot.com. Every page give 500 Internal server errors thats why google doesn't index our sites. This is my big problem.

There are a lot of reason for 500 Server Error. You can find most of them and solutions in this forum or wiki. But i didn't see one of them please change your webroot directory chown permission 755. May be this is your solution.
#19

[eluser]Phil Sturgeon[/eluser]
Quote:Options +Indexes
Options +FollowSymLinks

# Set the default file for indexes
DirectoryIndex index.php


RewriteEngine On
RewriteBase /

# This will make the site only accessible without the “www.”
# (which will keep the subdomain-sensive config file happy)
# RewriteCond %{HTTP_HOST} ^www\.$1$ [NC]
# RewriteRule ^(.*)$ http://$1 [R=301,L]


# If a controler can’t be found - then issue a 404 error from PHP
# Error messages (via the “error” plugin)
# ErrorDocument 403 /index.php/403/
# ErrorDocument 404 /index.php/404/
# ErrorDocument 500 /index.php/500/


# You can also uncomment this if you know the IP:
#Deny from 192.168.1.1

# If the file/dir is NOT real go to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php/$1 [L]

Hope you can see what I did there. Added your sub-folder as a base, then forced the sub-folder in there. I took out some extra conditions that weren't doing anything useful as well as a few minor tweaks.

Not tested, but it should be ok. If not, add your sub-folder to the start of the paths in the last line and change the rewrite base back to /. I've had plenty of problems with listing index.php/$1 as a relative URI in the past.




Theme © iAndrew 2016 - Forum software by © MyBB