briangelhaus Posted May 25, 2011 Share Posted May 25, 2011 i have a problem removing index.php. i made a simple video of my setup to help you understand faster. ive posted on other forums and no one could help me. ive followed all the instructions on CI site http://codeigniter.com/wiki/mod_rewrite/ heres the video http://dl.dropbox.com/u/9883217/code.mov Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/ Share on other sites More sharing options...
thehippy Posted May 25, 2011 Share Posted May 25, 2011 Is the mod_rewrite module being loaded in the apache configuration? If the line is started with a hash (#), its commented out and disabled, just remove the hash and save the conf you'll have to restart apache afterwards. It'll be something like LoadModule rewrite_module <mod_dir>/mod_rewrite.so If that's not the problem, check the access and error logs apache makes and get back to us. Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1219818 Share on other sites More sharing options...
briangelhaus Posted May 26, 2011 Author Share Posted May 26, 2011 yes in my apache httpd.conf file. it is not commented out LoadModule rewrite_module modules/mod_rewrite.so im not sure how to check access and error logs in apache ? Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1220590 Share on other sites More sharing options...
briangelhaus Posted May 26, 2011 Author Share Posted May 26, 2011 i tailed my apache error log and i got this [Thu May 26 10:40:29 2011] [notice] jrApache[65189: 59606] Couldn't initialize from remote server, JRun server(s) probably down. i get this for every project inside of my htdocs Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1220619 Share on other sites More sharing options...
thehippy Posted May 27, 2011 Share Posted May 27, 2011 hrmmm... Try removing the <ifmodule> argument from the first block in the .htaccess, comment out the second one. Lets try to get more info try enabling Apaches access log and see if that reveals anything <link to MAMP docs> Check the permissions on the .htaccess file, does Apache have sufficient permissions to read it? The error you mentioned is because Apache can't connect to a jrun server (a java application server), its probably not running. Shouldn't have anything to do with the mod_rewrite problem you're having though. This is probably all something very simple and we're both overlooking it. Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1220916 Share on other sites More sharing options...
briangelhaus Posted May 27, 2011 Author Share Posted May 27, 2011 i got rid of the ifmodule and just have.... RewriteEngine On RewriteBase /new/ RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] in my video in the httpd.conf in the apache mamp folder i allow override for .htaccess. so that should be on still no luck. it works when i upload it to my .com. but id like to test it in MAMP also. kids at my school have the same problem Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1220950 Share on other sites More sharing options...
thehippy Posted May 27, 2011 Share Posted May 27, 2011 Can you show us your whole httpd.conf? Remember to enclose it in code tags Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1221023 Share on other sites More sharing options...
briangelhaus Posted June 2, 2011 Author Share Posted June 2, 2011 i cant paste it in here because its over 4000 characters. so heres a download http://dl.dropbox.com/u/9883217/httpd.conf.zip Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1224402 Share on other sites More sharing options...
thehippy Posted June 3, 2011 Share Posted June 3, 2011 In your httpd.conf, Line 461 and 462 # AccessFileName .htaccess AccessFileName htaccess.txt Unquote the first line and delete the second and then restart Apache. Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1224468 Share on other sites More sharing options...
cassey071 Posted September 8, 2011 Share Posted September 8, 2011 use htaccess to remove the extension name of php <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /test_directory/cyrus/CallingCards #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> Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1266684 Share on other sites More sharing options...
jotorres1 Posted October 21, 2011 Share Posted October 21, 2011 Try this, as it worked for me without doing anything at all, just adding the .htaccess file to the root folder. Create a file called .htaccess, paste the following code into the document and upload to your server at the root web directory. # Customized error messages. ErrorDocument 404 /index.php # Set the default handler. DirectoryIndex index.php # Various rewrite rules. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L,QSA] </IfModule> Source: http://codeigniter.com/wiki/Dreamhost_.htaccess Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1281211 Share on other sites More sharing options...
keevitaja Posted November 2, 2011 Share Posted November 2, 2011 rewrite doesn't work on windows machines... Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1284367 Share on other sites More sharing options...
jotorres1 Posted November 2, 2011 Share Posted November 2, 2011 Works well for me on my XAMPP. Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1284404 Share on other sites More sharing options...
ME_php Fresher Posted February 21, 2012 Share Posted February 21, 2012 Change $config['index_page'] = 'index.php'; to $config['index_page'] = ''; and in the .htaccess file , write the following code RewriteEngine On RewriteCond %{REQUEST_URI} ^/system.* RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)$ index.php?/$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/237380-code-igniter-removing-indexphp/#findComment-1319513 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.