.htaccess - Why do I need to add index.php in order to route my website correctly? [getkirby] -
i uploaded code server. started homepage correctly . when press link , 404 not found error. discovered need add index.php url work. that:
mydomain.somee.com/mywebsite/index.php/anotherpage
when working locally using xamp server, didn't of problems. got problems after uploaded website some.com apparently doesn't use .htaccess file (editing or removing has no effect).
how add index.php automatically , hide user?
i didn't change of system files or htaccess please tell me if need anymore files or description.
you need redirect pages through index.php file remove url.
write below rules in root .htaccess
file:-
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php?/$1 [l]
or
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?$1 [l,qsa] rewritecond %{the_request} ^[a-z]{3,}\s(.*)/index\.php [nc] rewriterule ^ %1 [r=301,l]
to understand, how htaccess rules working, link :)
hope :)
Comments
Post a Comment