Welcome Guest, Not a member yet? Register   Sign In
htaccess is not working
#21

[eluser]hcvitto[/eluser]
[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
#22

[eluser]Clooner[/eluser]
[quote author="hcvitto" date="1214495678"][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[/quote]

It tells the url is incorrect. Try(different approach):
Code:
<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/
#23

[eluser]GabeHarris[/eluser]
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!

[quote author="ZeEsHaN RaSoOL" date="1214469185"]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[/quote]
#24

[eluser]hcvitto[/eluser]
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
#25

[eluser]domfosnz[/eluser]
I'm using XAMPP. The following worked for me:

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

Then in .htaccess:

Code:
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.
#26

[eluser]Unknown[/eluser]
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.


[quote author="domfosnz" date="1222865978"]I'm using XAMPP. The following worked for me:

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

Then in .htaccess:

Code:
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.[/quote]
#27

[eluser]stoefln[/eluser]
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
#28

[eluser]Unknown[/eluser]
Hi Zeeshan Rasool.
Thanks for the lines you posted ages before Smile
Worked for me.
Thanks
#29

[eluser]Unknown[/eluser]
[quote author="hcvitto" date="1214501534"]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[/quote]


thanks it works for me.. ^_^
#30

[eluser]Raul81[/eluser]
Hi everyone!
I'm having also problems... I'm using Xampp and I have mod_rewrite enabled.
The thing is that I want to use this type of URLs :

http://localhost/test/ict-j/page4.html

So my RewruteRule is :

RewriteRule ^(.+)-j/page([0-9]*)\.html$ index.php?/landing/getInfo/$1/$2 [L,QSA]

And these are my settings :

.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 ^(.+)-j/page([0-9]*)\.html$ index.php?/landing/getInfo/$1/$2 [L,QSA]

and config.php :

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

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";

With this configuration I'm getting 404 Page not found Sad .

I hope somebody could help me
Thnx




Theme © iAndrew 2016 - Forum software by © MyBB