在我的网站中,我使用.htaccess
规则从网址中删除了.php
扩展名。这样我就可以进入没有.php扩展名的任何页面。例如:为什么.htaccess显示我“内部服务器错误”?
http://localhost/aponit/dev/zones (there are no .php extension)
现在,我有一个PHP页面中的链接来更新表单数据。 Link是波纹管:
<a class="btn btn-success btn-xs" href="<?php echo SITE_URL."update/$zone_id"?>" >Edit</a>
此链接显示以下网址:
http://localhost/aponit/dev/update/54
但不幸的是它显示我的错误信息:
我使用以下内部服务器错误.htaccess规则:
ErrorDocument 404 /not-found.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
RewriteRule ^update/([0-9]+) update?z=$1 [L]
你在wordpress/laravel/codeigniter或任何其他此类服务? – hjpotter92
我正在使用核心的PHP。 –