Removing /index.php/ Running on XAMPP on a virtual host - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Removing /index.php/ Running on XAMPP on a virtual host (/showthread.php?tid=54241) |
Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-29-2012 [eluser]xecure[/eluser] Hi guys I tried using the code given in the documentation. For reference this is the code I'm using: Code: RewriteEngine on But it isn't working. My set up is a little unique. I'm running XAMPP under windows 8. Even though my XAMPP is installed at C:\xampp My document root isn't C:\xampp\htdocs. I've set up a virtual host so (I believe) my document root is at C:\Users\userName\Dropbox\Projects\projectName. (typing in http://localhost on my browser points to C:\Users\userName\Dropbox\Projects\projectName\index.php) My .htaccess file is located at C:\Users\userName\Dropbox\Projects\projectName\.htaccess Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-29-2012 [eluser]puffnstuff[/eluser] Did you remove index.php from your config file? Also try removing the slash in front of index.php Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-30-2012 [eluser]xecure[/eluser] I'm assuming you're taking about /config/config.php I did a ctrl + F on that file and there isn't any string of characters that say 'index.php' I have never used a php framework (though have used php before) and I'm modifying a web app developed by another team. Please bear with me if I ask obvious questions. Also tried removing the slash in front of the index.php in my .htaccess file with no luck. Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-31-2012 [eluser]xecure[/eluser] bump.. Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-31-2012 [eluser]Pendorcho[/eluser] There may be a problem in the virtual host. Try to set up your DocumentRoot to your project location and same for the Directory of your DocumentRoot. Reset apache. The config.php must be black: $config['index_page'] = '';. I had the same problem because the inclusion of .htaccess try to search in another directory (check yout apache error log). Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 08-31-2012 [eluser]Pendorcho[/eluser] Also on XAMPP enable the module rewrite_module (disabled by default) Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 09-01-2012 [eluser]xecure[/eluser] [quote author="Pendorcho" date="1346461858"]Also on XAMPP enable the module rewrite_module (disabled by default)[/quote]How do I enable this? In my httpd.conf file i did a ctrl + F for rewrite_module and this is the line I see: Code: LoadModule rewrite_module modules/mod_rewrite.so Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 09-05-2012 [eluser]xecure[/eluser] bump.. According to my httpd.conf file mod_rewrite is turned on (it was by default on XAMPP, I don't know if it's always like this) I've uploaded a copy of the site to a separate host with this .htaccess file: Code: RewriteEngine On Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 09-05-2012 [eluser]PhilTem[/eluser] How about AllowOverride in your httpd.conf of you XAMPP? Removing /index.php/ Running on XAMPP on a virtual host - El Forum - 09-06-2012 [eluser]xecure[/eluser] [quote author="PhilTem" date="1346880748"]How about AllowOverride in your httpd.conf of you XAMPP?[/quote]I think it had something to do with this. For future readers and reference this is the .htaccess that worked properly: Code: NameVirtualHost * |