mardi 3 septembre 2019

Remove server.php using htaccess got error 500

I have a website that can be accessed in two ways:

  1. http://localhost/public/blog
  2. http://localhost/server.php/blog

I use the code below to remove the "public" from the url, and its work.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

so i try to remove server.php using the same code, just change "public" to "server.php". But its does not work.

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ server.php/$1 [L]
</IfModule>

Server return error code 500.

The server log log reports:

[Wed Sep 04 01:06:53.801523 2019] [core:error] [pid 546] [client 182.253.16.222:36164] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

So my expectation from the second code is address "http://localhost/server.php/blog" can be access without server.php in there (http://localhost/blog).



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32stefD
via IFTTT

Aucun commentaire:

Enregistrer un commentaire