php - .htaccess url on localhost -
i got little problem .htaccess file. work somehow doesn't work 100%. i'm looking way build website depending on url. illustration 'example.com/en/home' home page. problem can work when url this: 'example.com/index/en/home'
my code in .htaccess file is:
rewriteengine on rewritebase /htaccess/ rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1
domain:
localhost/~axll/htaccess/
the root folder located on localhost(xampp mac) under htaccess. if understand correctly, should append 'en/home' index file, should able leave 'index' part out in url, right?
edit 1: used $_server['path_info'] in php , got following:
array ( [0] => [1] => php [2] => test )
shouldn't index of array different null?
maybe in host configuration set allowoverride none? disable utilize of .htaccess files
change allowoverride all enable
php .htaccess localhost
No comments:
Post a Comment