Hi.
I've been working on this for maybe 10 hours without success and hope someone can help me here.
Sounds simple:
I want the user to enter URLs similar to this:
www.site.com/thisuser
or
www.site.com/thisuser/
(never underestimate the stupidity of the user, so I want it to work with or without the last slash)
The folder /thisuser/ (or whatever else is entered) does not exist.
This should redirect the user to:
www.site.com/users/index.php?id=thisuser
And for some reason I can't get it to work. All I get is either Firefox or Error 500 telling me about redirecting loops.
I keep seeing this version here that should work, but for some stupid reason it just won't for me:
#Options +FollowSymlinks
Options +FollowSymLinks -MultiViews
# // found -MultiViews somewhere and tried it without success
RewriteEngine on
#RewriteCond %{SCRIPT_FILENAME} !-f
#RewriteCond %{SCRIPT_FILENAME} !-d
# // for testing purposes, I simply disabled these for now to make sure it is the next line that does the work:
RewriteRule ^([^/]+)/?$ /testredirect.php?$1 [QSA,L]
# //used /testredirect.php for now to see if it would work - tried /test/$1 before, also without success
According to one or two different forum posts I found, this should be exactly the code I want.
Why does it create these loops?
Any idea on what I can do?
Thanks so much in advance!