简体   繁体   English

开发环境-LAMP-Xampp-Mod-Rewrite

[英]Development Environment - LAMP - Xampp - Mod-Rewrite

I am currently attempting to build a development environment using xampp. 我目前正在尝试使用xampp构建开发环境。 I have set-up Xampp and connected it to a local copy of the sites database. 我已经设置了Xampp并将其连接到站点数据库的本地副本。 I am able to access the the home page when using the following URL: localhost/sitename. 使用以下URL时,我可以访问主页:localhost / sitename。 However, once I click on any of the links it directs me to an error page that says "The requested URL was not found on this server". 但是,一旦单击任何链接,它会将我定向到错误页面,该页面显示“在此服务器上找不到所请求的URL”。 The URL it directs me to is localhost/sitename/foldername. 它指向我的URL是localhost / sitename / foldername。 The site uses MVC archetecture, so the site should direct the user to the proper controller. 该站点使用MVC架构,因此该站点应将用户定向到适当的控制器。

I have ensured i have activated mod_rewrite on the httpd.conf file and placed the .htaccess file within the applications folder. 我确保已在httpd.conf文件上激活了mod_rewrite并将.htaccess文件放在了Applications文件夹中。 Any other ideas how to fix this issue? 还有其他想法如何解决此问题?

也许AllowOverride在您的apache配置中已禁用。

检查RewriteEngine是否打开。。此外,请确保RewriteBase是正确的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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