-1

The PHP Nette framework, Url is not working on localhost. On the live server it is working fine but when I installed it on localhost from the latest backup from hosting server it does not work.

My .htaccess file is as:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^(.*)$ /www/$1 [L,NE]
</IfModule>

My Localhost URL on Wamp which the home page is working properly

http://localhost/ongoingclients/www/www/

But other urls are not working.

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93

2 Answers2

1

what does it mean that it is not working? It shows 404 from apache?

try to check that

  • mod_rewrite in apache is enabled
  • AllowOverride in apache vhost settings is set to All
  • It shows 200 ok, also i checked with both mod_rewrite & AllowOverride of Apache httpd & vhost. Still not working – Suresh Shinde Apr 14 '17 at 09:49
  • In PHP Nette framework Url not working on localhost. On the live server It is working fine, I installed on localhost from the latest backup from hosting server. Plz help me – Suresh Shinde Apr 14 '17 at 14:08
0

The above issue is resolved by .htaccess of rule RewriteBase

 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /ongoingclients/www/www/

    # prevents files starting with dot to be viewed by browser
    RewriteRule /\.|^\. - [F]

    # front controller
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L]
   </IfModule>

Got success, thank you.