Victor Kimura
asked on
correct pretty URLs in .htaccess Apache
Hi,
I have this URL:
http://localhost/test/trunk/php/l4/public/index.php
and it works fine. I'm using Laravel 4 btw.
I added some code but this URL doesn't work:
http://localhost/test/trunk/php/l4/public/users
But this funny-looking URL works though:
http://localhost/test/trunk/php/l4/public/index.php/users
So I know the program is working but how I can fix it so the URL works:
http://localhost/test/trunk/php/l4/public/users
Just fyi, I was reading this page under the "Routing" section and just added that small tidbit of code:
http://laravel.com/docs/quick#installation
I have this in my .htaccess file:
How can I fix it to make this work in .htaccess?
Thank you and Father bless<><
I have this URL:
http://localhost/test/trunk/php/l4/public/index.php
and it works fine. I'm using Laravel 4 btw.
I added some code but this URL doesn't work:
http://localhost/test/trunk/php/l4/public/users
But this funny-looking URL works though:
http://localhost/test/trunk/php/l4/public/index.php/users
So I know the program is working but how I can fix it so the URL works:
http://localhost/test/trunk/php/l4/public/users
Just fyi, I was reading this page under the "Routing" section and just added that small tidbit of code:
http://laravel.com/docs/quick#installation
I have this in my .htaccess file:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /
# Redirect Trailing Slashes...
#RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
How can I fix it to make this work in .htaccess?
Thank you and Father bless<><
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Also, what worked for me was that I had to enable the mod_rewrite in Apache because by default it's not enabled for WAMP which is odd I think since it's so widely used. But then I had to restart my computer or log out and then log back in again because it's tied to the Windows session. Hope this helps others too. Father God bless<><
ASKER
It's the Lararel framework so there is no public/users folder. I don't know the inner workings of the framework but it's supposed to work. The youtube videos I've seen have used a Vagrant box for it so maybe it'll work then.