Welcome Guest, Not a member yet? Register   Sign In
Help me with this routing issue
#1

[eluser]vipercat[/eluser]
When I go here: http://localhost/codeigniter/index.php/gallery the file is there

but when I go here: http://localhost/codeigniter/gallery
I get this:
Not Found The requested URL /codeigniter/gallery was not found on this server.

However when I go here: http://localhost/codeigniter/ everything is good. It's the same as http://localhost/codeigniter/index.php/

I put this in my .htacess file in the system folder:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I also made sure that in the config.php file that

$config['base_url'] = '';

$config['index_page'] = '';

--
Thank you in advance!
#2

[eluser]PhilTem[/eluser]
Try
Code:
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /codeigniter/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
#3

[eluser]vipercat[/eluser]
Didn't work PhilTem, but thanks for trying.
#4

[eluser]vipercat[/eluser]
I did this in the httpd.conf file but it still doesn't work: http://www.tildemark.com/enable-htaccess-on-apache/

I also did this for the htaccess file and the config.php file:
http://www.anmsaiful.net/blog/php/remove...x-php.html

but it still doesn't work.

please help me.
#5

[eluser]ojcarga[/eluser]
This should work

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

Is the one i'm using with current project i'm working on.
#6

[eluser]PhilTem[/eluser]
If the latter htaccess-code doesn't work: Do you run Windows or Linux or Mac? I experienced that mod-rewrite didn't work properly for xampp on a windows machine. That might be the cause of your problem, too Wink
#7

[eluser]vipercat[/eluser]
hey dude thanks. I just put it in my web hosting and gave up on getting it to work on my local environment.
#8

[eluser]chien[/eluser]
[quote author="PhilTem" date="1343527802"]Try
Code:
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /codeigniter/
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
[/quote]

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB