P
P
prebionix2016-09-14 11:19:17
htaccess
prebionix, 2016-09-14 11:19:17

What is the best way for me to compose the .htaccess file?

There is a site on which I want that when I go to the site/user1, there will be a direction to the site/profile.php?user=user1, and when I go to the site/feed, there will be a site/action.php.
So I made a file:

RewriteRule ^([a-zA-Z0-9_\-]+)(/?)$ profile.php?user=$1 [L,QSA]
RewriteRule ^feed(/?)+$ action.php [L,QSA]

Everything works with users, only /feed is looking for profile.php?user=feed

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2016-09-14
@prebionix

Obviously make the feed rule first.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question