Part of the EllisLab Network
   
2 of 2
2
htaccess is not working
Posted: 26 June 2008 05:26 AM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  419
Joined  10-22-2007

Rewrite_Module : Enabled
I know..still
check your rewritemod it may be off..try to enable that.

or switch to wamp

 Signature 

Blogmer - Open source blogging software based on codeigniter
Blogmer Documentation
Web Design company and FREE PHP MySQL Webhosting

Profile
 
 
Posted: 26 June 2008 05:31 AM   [ Ignore ]   [ # 17 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  06-06-2007
hcvitto - 26 June 2008 05:23 AM

i changed
RewriteBase CodeIgniter/

but now i got an error 500 on all pages..

What do the apache error logs say?

Try:
RewriteBase /CodeIgniter/

 Signature 

Arie.nl My CodeIgniter webshop.
http://werkschoenen.arie.nl, http://auto.arie.nl, http://merken.arie.nl, http://poets-wax.arie.nl, http://gereedschap.arie.nl

Profile
 
 
Posted: 26 June 2008 05:33 AM   [ Ignore ]   [ # 18 ]  
Summer Student
Total Posts:  14
Joined  06-26-2008

mmh..rewritemod is on..
about wamp, i already spent time on xampp, i’m afraid i got not much time to start all over again..thanx anyway

Profile
 
 
Posted: 26 June 2008 05:41 AM   [ Ignore ]   [ # 19 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  06-06-2007
hcvitto - 26 June 2008 05:33 AM

mmh..rewritemod is on..
about wamp, i already spent time on xampp, i’m afraid i got not much time to start all over again..thanx anyway

What causes the 500 error? What do the log files say?

 Signature 

Arie.nl My CodeIgniter webshop.
http://werkschoenen.arie.nl, http://auto.arie.nl, http://merken.arie.nl, http://poets-wax.arie.nl, http://gereedschap.arie.nl

Profile
 
 
Posted: 26 June 2008 05:54 AM   [ Ignore ]   [ # 20 ]  
Summer Student
Total Posts:  14
Joined  06-26-2008

[Thu Jun 26 12:47:59 2008] [error] [client 127.0.0.1] File does not exist: C:/Programmi/xampp/htdocs/CFIDE
[Thu Jun 26 12:52:11 2008] [alert] [client 127.0.0.1] C:/Programmi/xampp/htdocs/CodeIgniter/.htaccess: RewriteBase: argument is not a valid URL, referer: http://localhost/CodeIgniter/index.php/

this is the error form Apache log file

Profile
 
 
Posted: 26 June 2008 06:07 AM   [ Ignore ]   [ # 21 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  212
Joined  06-06-2007
hcvitto - 26 June 2008 05:54 AM

[Thu Jun 26 12:47:59 2008] [error] [client 127.0.0.1] File does not exist: C:/Programmi/xampp/htdocs/CFIDE
[Thu Jun 26 12:52:11 2008] [alert] [client 127.0.0.1] C:/Programmi/xampp/htdocs/CodeIgniter/.htaccess: RewriteBase: argument is not a valid URL, referer: http://localhost/CodeIgniter/index.php/

this is the error form Apache log file

It tells the url is incorrect. Try(different approach):

<IfModule mod_rewrite.c>
  
RewriteEngine On
  RewriteBase
/
  
RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond
%{REQUEST_FILENAME} !-d
  RewriteRule
^(.*)$ /CodeIgniter/index.php/$1 [L]
</IfModule>

or try setting
RewriteBase http://localhost/CodeIgniter/

 Signature 

Arie.nl My CodeIgniter webshop.
http://werkschoenen.arie.nl, http://auto.arie.nl, http://merken.arie.nl, http://poets-wax.arie.nl, http://gereedschap.arie.nl

Profile
 
 
Posted: 26 June 2008 07:00 AM   [ Ignore ]   [ # 22 ]  
Summer Student
Total Posts:  1
Joined  06-25-2008

FINALLY got it to work. I tried every combination of every idea mentioned in this thread. I have CI in my root directory, mod_Rewrite on. Here’s what worked for me:
I used the .htaccess file quoted below
I changed my config.php so that my $config[‘base_url’]  = “http://full.domain.name.com/index.php/”
And I set the $config[‘index_page’] = “”;

What finally made it work was putting the whole path in my base_url config setting. Hope this helps some one!

ZeEsHaN RaSoOL - 25 June 2008 10:33 PM

Yar ! i think you have to check this code. Save it wirh .htaccess but remove ‘index.php’ from your config.php file

Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Hope you will get it.
...............JaMzEe

Profile
 
 
Posted: 26 June 2008 07:32 AM   [ Ignore ]   [ # 23 ]  
Summer Student
Total Posts:  14
Joined  06-26-2008

great, it works for me too!!

here my .htaccess code

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /CodeIgniter/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ /CodeIgniter/index.php/$1 [L]
</IfModule>
<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>

thanks to everybody
vitto

Profile
 
 
Posted: 01 October 2008 02:59 AM   [ Ignore ]   [ # 24 ]  
Summer Student
Total Posts:  5
Joined  10-01-2008

I’m using XAMPP. The following worked for me:

$config['base_url'] = "http://127.0.0.1/rootfolder/"
$config['index_page'] = "";

Then in .htaccess:

Options +FollowSymLinks
Options
-Indexes
DirectoryIndex index
.php
RewriteEngine on
RewriteCond
$1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond
%{REQUEST_FILENAME} !-d
RewriteRule
^(.*)$ index.php?/$1 [L,QSA]

I also configured apache to allow rewriting.

 Signature 

Find me on Twitter - twitter.com/domfosnz

Profile
 
 
Posted: 01 November 2008 12:14 PM   [ Ignore ]   [ # 25 ]  
Summer Student
Total Posts:  1
Joined  11-01-2008

I also had big problems with the site links in the production environment (on the public host server) - URL not found… error 500 internal server error etc.

In my case the troubles were with URL strings and the web server itself.

It turns out that some web servers just do not allow a URL like ...index.php/something
It has to be like this to work: ...index.php?something
So, you should change the RewriteRule like this:

RewriteRule ^(.*)$ /index.php?$1 [L,QSA]

and everything runs fine now.

domfosnz - 01 October 2008 02:59 AM

I’m using XAMPP. The following worked for me:

$config['base_url'] = "http://127.0.0.1/rootfolder/"
$config['index_page'] = "";

Then in .htaccess:

Options +FollowSymLinks
Options
-Indexes
DirectoryIndex index
.php
RewriteEngine on
RewriteCond
$1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond
%{REQUEST_FILENAME} !-d
RewriteRule
^(.*)$ index.php?/$1 [L,QSA]

I also configured apache to allow rewriting.

Profile
 
 
Posted: 07 January 2009 08:10 AM   [ Ignore ]   [ # 26 ]  
Grad Student
Rank
Total Posts:  74
Joined  06-03-2008

i dont get it working. i always get a 404. no matter what i write into the .htaccess
is there no way to test if the .htaccess is loaded?
my CI is under
d:\htdocs\clipr

my url, which i m trying to connect to is:
http://localhost:8502/clipr/cms/welcome

the log in the apache error.log:
File does not exist: D:/htdocs/clipr/cms

Profile
 
 
   
2 of 2
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120494 Total Logged-in Users: 38
Total Topics: 126565 Total Anonymous Users: 4
Total Replies: 665431 Total Guests: 342
Total Posts: 791996    
Members ( View Memberlist )