{"id":769,"date":"2024-02-16T09:11:15","date_gmt":"2024-02-16T09:11:15","guid":{"rendered":"https:\/\/www.cmsgalaxy.com\/blog\/?p=769"},"modified":"2024-02-16T09:11:17","modified_gmt":"2024-02-16T09:11:17","slug":"problem-after-deploy-laravel-project-only-route-is-working-other-route-is-not-working-on-route-php-file","status":"publish","type":"post","link":"https:\/\/www.cmsgalaxy.com\/blog\/problem-after-deploy-laravel-project-only-route-is-working-other-route-is-not-working-on-route-php-file\/","title":{"rendered":"Problem :- after deploy Laravel project only &#8220;\/&#8221; route is working other route is not working on route.php file"},"content":{"rendered":"\n<p>\u00a0Web page error like this :&#8212;<\/p>\n\n\n\n<p>Not Found<\/p>\n\n\n\n<p>The requested URL \/yes was not found on this server.<\/p>\n\n\n\n<p>Additionally, a 404 Not Found error was encountered while trying to use an Error Document to handle the request<\/p>\n\n\n\n<p><strong><em>Solution :-<\/em><\/strong> <\/p>\n\n\n\n<p>You need to setup&nbsp;.htaccess&nbsp;rewrite on your server. You may need to install and enable the&nbsp;mod_rewrite&nbsp;apache module (or similar alternative for your chosen http server).<\/p>\n\n\n\n<p>Check that the public folder for your app has a\u00a0.htaccess\u00a0file, similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t&lt;IfModule mod_rewrite.c>\r\n\t    &lt;IfModule mod_negotiation.c>\r\n\t        Options -MultiViews\r\n\t    &lt;\/IfModule>\r\n\t\r\n\t    RewriteEngine On\r\n\t\r\n\t    # Redirect Trailing Slashes If Not A Folder...\r\n\t    RewriteCond %{REQUEST_FILENAME} !-d\r\n\t    RewriteRule ^(.*)\/$ \/$1 &#91;L,R=301]\r\n\t\r\n\t    # Handle Front Controller...\r\n\t    RewriteCond %{REQUEST_FILENAME} !-d\r\n\t    RewriteCond %{REQUEST_FILENAME} !-f\r\n\t    RewriteRule ^ index.php &#91;L]\r\n\t\r\n\t    # Handle Authorization Header\r\n\t    RewriteCond %{HTTP:Authorization} .\r\n\t    RewriteRule .* - &#91;E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]\r\n\t&lt;\/IfModule>\r\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0Web page error like this :&#8212; Not Found The requested URL \/yes was not found on this server. Additionally, a<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-769","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/comments?post=769"}],"version-history":[{"count":3,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/769\/revisions"}],"predecessor-version":[{"id":772,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/769\/revisions\/772"}],"wp:attachment":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media?parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/categories?post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/tags?post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}