Home mod_rewrite not working in Laravel 5
Reply: 0

mod_rewrite not working in Laravel 5

user1017
1#
user1017 Published in April 22, 2018, 12:58 am

Using Laravel 5.5, when trying to access http://127.0.0.1:8000/test/search/357 I am getting a page cannot be found error. Non of the other solutions have worked for me. My .htaccess file resides in the root directory and looks like this:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

Options +FollowSymLinks
RewriteEngine On

RewriteBase "/test/"

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/test/ # <=== NEW LINE!!!!
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]


RewriteRule ^/test/search/(.*)$ /test/search?m_id=$1&a=1 [QSA, L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Any help would be appreciated. Thanks.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302873 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO