Home mod_rewrite not working in Laravel 5
Reply: 1

mod_rewrite not working in Laravel 5

user1114795 Published in 2017-12-02 23:48:43Z

Using Laravel 5.5, when trying to access 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

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.

Croises Reply to 2017-12-02 23:56:17Z

You can use:

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

Without left / in htaccess RewriteRule
And place the rule before # Handle Front Controller

You need to login account before you can post.

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

© 2016 Powered by mzan.com design MATCHINFO