Can't remove index.php from URL |
[eluser]João Ramos[/eluser]
I'm running Apache natively on my Mac and followed the steps on the "Removing the index.php file" wiki article. I also made sure my Apache uses the mod_rewrite module and accepts needed .htaccess directives, as according to the Mod rewrite wiki article as well. However, I can't still load controllers without having to insert the "index.php" on the URL. Unfortunately, I'm too rookie to understand how to properly debug this or how to give you any more detailed information. Can you guys help me out with this?
[eluser]CroNiX[/eluser]
Please do a search for "htaccess" on this site. This is probably the most frequently asked question here and there are many, many examples and suggestions in the forums already.
[eluser]João Ramos[/eluser]
Obviously, I did it before posting this: I tried different .htaccess setups and edits. Like I said, I'm too rookie to understand how to deal with this kind of rounting/rules and I don't even know how to properly explain in detail why I can't just use my app without the /index.php/ on my URL.
[eluser]CroNiX[/eluser]
Well, no, it's not obvious you tried. Many people come here and just ask questions without looking first, or reading the user guide. Try this .htaccess, and place it at the same location as index.php: Code: Options +FollowSymlinks The next question is: How are you writing your urls, like in anchors? Manually or using some of the URL Helpers? I have a feeling it is how you have the apache server set up though. Macs have most of the stuff disabled and you have to fudge with the apache conf. Make sure your apache conf has these lines or you can't rewrite properly: Quote:Options Indexes FollowSymLinks
[eluser]InsiteFX[/eluser]
A quick way to test if your .htaccess file is working it to place TEST at the top of the file if it's working you will get a server 500 error.
[eluser]João Ramos[/eluser]
Thanks for you attention, guys. However, I must be doing something really wrong, as it keeps giving me Not Found errors (even by using TEST] on top of the .htaccess file, which may suggest httpd.conf is messed up?). In fact, I'm almost sure I'm copy/pasting the httpd.conf instructions you gave me on the wrong section of my httpd.conf. Here's my httpd.conf (I know I shouldn't use URLs, but it seems it's too many characters to paste here and the forum says it can't write files to disk when I attach files): pastie.org/private/ptoymg41ypgm5xafzyf7q.
[eluser]Mody[/eluser]
I have been facing this problem and its never working on my Ubuntu XAMPP, just because its http://localhost/ or http://ipaddress. the htaccess is working on Windows xampp or any domain name but not on my ubuntu when using localhost or ipaddress
[eluser]skcin7[/eluser]
Hey there. Here is the full contents of my .htaccess file (which removes "index.php" from the URL) Code: <IfModule mod_rewrite.c> |
Welcome Guest, Not a member yet? Register Sign In |