简体   繁体   中英

Webiste url are not routing without index.php

I uploaded my website from my UAT/Test domain to EC2 AWS. Before everything was fine, but now only home page opens.

And if I try to navigate to any other links I can't, it gives following error

The requested URL /page/company was not found on this server.

But when I insert index.php in between it works fine.

Any ideas?

请在服务器中启用mod_rewrite模块,并在htaccess文件中重写index.php。

请检查您的文件权限

I believe the issue could be DirectoryIndex which apache (not positive that is what you are using as web server) uses to direct the user to a specific file if a directory is selected in the URL.

This can be set in your apache config if you have access, or in a .htaccess file if you only have access to the your webspace itself.

http://www.htaccess-guide.com/directoryindex-uses/

Basically with DirectoryIndex you can tell apache to automatically use index.php, or index.html, or really whatever file you want to be used when no file in a directory is given in the URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM