Mine is a question.
I have a redirect from, (example.com/users?user='username')
I have redirected this to (example.com/username)
How I am also trying to redirect (example.com/members/settings) to (example.com/settings), the redirect seems to work, except that, its opening the page of (example.com/username).
Here is my code.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)$ users/index.php?id=$1 [L]
RewriteEngine on
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^example.com/members/settings$ http://example.com/settings/ [R=301,L]
How can i make (example.com/settings) to open its own page?
    
Top comments (2)
Your first rule is saying, "take any path that doesn't include a
/and send it as a query string value tousers/index.php. This is relatively safe, I think.Your second rule, the redirect from
example.com/members/settingstohttp://example.com/settings/has a couple of problems:example.comparthttpin the redirect which isn't necessary and will probably break things if you're usinghttps(which most people do).If you browse to
/settings/with the trailing slash (like the redirect suggests) it's possible it'll work, however, it'll be trying to get its content from something like/settings/index.htmlunless you're using other overrides somewhere else.If you browse to
/settingswithout the trailing slash it'll hit the first rule and redirect tousers/index.php?id=settingsYou don't need to use
RewriteEngine Onmore than once.I don't have any of this set up, so I don't guarantee anything I say is particularly right.
your response is highly appreciated. Let me try to check through.