0

I had this code before

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /lr/profile.php?username=$1

But that makes the profiles go to coolsite.com/Something I want the profile link go to /profile/Something instead of profile.php?username=Something

How can i do that?

4

1 回答 1

1

除非您的问题比我看到的更多,否则只需将您的 RewriteRule 更改为以下内容即可解决问题。

RewriteRule ^profile/(.*)$ /lr/profile.php?username=$1
于 2012-08-01T04:54:04.857 回答