如何使用.htaccess将example.com/profile?username=test重定向到example.com/test |

如何使用.htaccess将example.com/profile?username=test重定向到example.com/test |,.htaccess,.htaccess,我的用户如何通过 而不是 使用.htaccess来吧,伙计。对于这个例子,可能有几十个问题。这真是个常见的问题。这应该可以让我知道。:) RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+) /profile?username=$1

我的用户如何通过
而不是


使用.htaccess来吧,伙计。对于这个例子,可能有几十个问题。这真是个常见的问题。这应该可以让我知道。:)

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+) /profile?username=$1