Removing /index.php/ Running on XAMPP on a virtual host |
[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
[eluser]puffnstuff[/eluser]
Did you remove index.php from your config file? Also try removing the slash in front of index.php
[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.
[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).
[eluser]Pendorcho[/eluser]
Also on XAMPP enable the module rewrite_module (disabled by default)
[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
[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
[eluser]PhilTem[/eluser]
How about AllowOverride in your httpd.conf of you XAMPP?
[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 * |
Welcome Guest, Not a member yet? Register Sign In |