所以我有一个.haccess文件,用于将网址profile.php?user_username=Test
重写为keepkey.96.it/test
,但它不起作用。网址
保持不变。
这是我的.htaccess文件
RewriteBase /
RewriteEngine On
RewriteCond %{THE_REQUEST} \ /+profile\.php\?user_username=([^&\ ]+)
RewriteRule ^ /%1? [L,R]
RewriteRule ^/(.*)$ profile.php?user_username=$1 [L]
编辑:我已设法获取要重写的网址,现在显示为http://keepkey.96.lt/Test
而不是http://keepkey.96.lt/profile.php?user_username=Test
。但现在我收到error 404
消息,有什么想法吗?
以下是错误消息:
Not Found
The requested URL /Test was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.