我想重写 我的网址:
http://www.example.com/mypage.php?unm=hr
重写后:
http://www.example.com/hr
.htaccess 文件:
RewriteEngine On
RewriteRule ^([^/]*)$ /myuser.php?url=$1 [L]
但它引发了一个错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at postmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 Server at localhost Port 80
您必须指定所有 javascript 以及所有 css 文件都有完整路径 喜欢 我们通常访问文件就像
<link href="css/pygments-manni.css" rel="stylesheet">
现在你可以像这样使用了。
<link href="<?php echo $path ?>css/pygments-manni.css" rel="stylesheet">
$path="http://".$_SERVER['HTTP_HOST']."/" ;
请确保以下事项:
RewriteEngine On
C:\Users\BCA35\AppData\Local\Programs\Python\Python312