probably my question duplicate with an other title but, I have read too many title and checked many times with google. So if it duplicates, I am sorry.

Now I have an URL:

```
www.mysite.com/profile.php

```

I am using this URL rewrite rule:

```
RewriteRule ^([A-Za-z0-9-_]+)/?$    profile.php?username=$1 [NC,L]

```

And I can change my url like:

```
www.mysite.com/username

```

Then, I need to update my url with an other get parameter:

```
www.mysite.com/username/photos

```

At this part, I have an URL like:

```
www.mysite.com/profile.php?username=xxx&w=photo

```

I have tried this URL rule for the url for above:

```
RewriteRule ^([A-Za-z0-9-_]+)/?$/?$    profile.php?username=$1&w=$2 [NC,L]

```

But It does not work. Please help.

Thank you very much.

-------UPDATE------

Now I can use profile.php which It should be. But other rewrite rules are broken. My current .htaccess file like this:

```
RewriteEngine On

RewriteRule ^([\w-]+)/([\w-]+)/?$ profile.php?username=$1&w=$2 [QSA,L]
RewriteRule ^([\w-]+)/?$ profile.php?username=$1 [QSA,L]
RewriteRule ^p/timeline timeline.php [NC,L]
RewriteRule ^p/notifications notifications.php [NC,L]

```