Tuesday, 15 May 2012

php - Lavarel REST API "Status 404 Not Found" -


itemprop = "text"

Currently we have a laravel rest API system running with Apache, PHP and a remote database which is a SQL Server, a Linux server Server is running inside. My senior officials asked me to make the same system, but instead use Windows, IIS, and PHP. Now I have followed all the installation instructions in the net and even reached the Laravel 5 screen page. Now when I moved the Larval files and installed it in windows then there was no error in the process. I also imported my .htaccess configuration for IIS. However, when I requested the API it is returning an HTTP status 404 error.

Here is my .htaccess file

  & lt; IfModule mod_rewrite.c & gt; & Lt; IfModule mod_negotiation.c & gt; Option -multi view & lt; / IfModule & gt; # Redirection rear slash RewriteEngine on ... RewriteRule ^ (. *) / $ / $ 1 [L, R = 301] # Handle Front Controller ... RewriteCond% {REQUEST_FILENAME}! -d RewriteCond% {REQUEST_FILENAME}! -f RewriteRule ^ Index.php [L] & lt; / IfModule & gt; & Lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; System.webServer & gt; & Lt; DirectoryBrowse enabled = "true" /> & Lt; Rewrite & gt; & Lt; Rules & gt; & Lt; Rule name = "imported rule 1" stopping = processing "true" & gt; & Lt; Match url = "(. *) ^ / $" IgnoreCase = "false" /> & Lt; Action type = "redirect" url = "/ {R: 1}" redirectType = "permanent" /> & Lt; / Rules & gt; & Lt; Rule name = "imported rule 2" stop processing = "true" & gt; & Lt; Mail url = "^" Ignore = "false" /> & Lt; Conditions logical group = "match" & gt; & Lt; Type input = "{REQUEST_FILENAME}" match type = ignore "IsDirectory" Case = "false" negate = "true" /> & Lt; Type input = "{REQUEST_FILENAME}" match type = ignore "IsFile" Case = "false" negate = "true" /> & Lt; / Status & gt; & Lt; Action type = "rewrite" url = "index.php" /> & Lt; / Rules & gt; & Lt; Rule name = "imported rule 3" stopProcessing = "true" & gt; & Lt; Mail url = "^" Ignore = "false" /> & Lt; Conditions logical group = "match" & gt; & Lt; Type input = "{REQUEST_FILENAME}" match type = ignore "IsDirectory" Case = "false" negate = "true" /> & Lt; Type input = "{REQUEST_FILENAME}" match type = ignore "IsFile" Case = "false" negate = "true" /> & Lt; / Status & gt; & Lt; Action type = "rewrite" url = "index.php" /> & Lt; / Rules & gt; & Lt; / Rules & gt; & Lt; / Rewrite & gt; & Lt; /system.webServer> & Lt; / Configuration & gt;  


No comments:

Post a Comment