我想传递一个url参数,例如example.com/username
或example.com/myemail@gmail.com
我想匹配两个条件,如果有人从表中选择是真的吗?
这是我的.htaccess代码
# Default index page
DirectoryIndex index.php
# Remove file extensions
RewriteCond %{REQUEST_FILENAME} !-f
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
# Display a custom error message
#ErrorDocument 404 http://localhost//
#ErrorDocument 500 http://localhost//
#ErrorDocument 404 404
#ErrorDocument 500 500
#Profile rewrite
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?ref=$1