Wamp Server 및 URL 다시 쓰기에 문제가 있습니다. 프로덕션 서버에서 내 프로젝트를 .htaccess으로 가져 왔습니다. URL 재 작성은 프로덕션에서는 정상적으로 작동하지만 localhost에서는 정상적으로 작동하지 않습니다.URL Wamp 서버에서 다시 쓰기가 작동하지 않습니다.
내 Wamp 구성에서 rewrite_module이 활성화되었습니다. httpd.conf 파일에서 :
<Directory "c:/wamp/www/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
# Require local
Allow from all
</Directory>
하지만, 내 웹 사이트에 링크는 404 오류를 반환 http://localhost/conditions. 내 htaccess로 :
Options +FollowSymlinks
RewriteEngine on
# Conditions
RewriteRule ^conditions pages/conditions.php [L]
모든 파일은 WAMP의 루트에 (C :/WAMP/www /에서).
도움말 :(httpd.conf
에서
가능한 맞춤법 오류가 있습니까? 'RewriteRule^conditions $ /pages/conditions.php [L]'. 방금 일어났습니다.) – DeDee
.htaccess는'C : /'에 어디에 있습니까? – anubhava