.htaccess mod重写[公共配置文件而非私有]

I have a social networking script that I am trying to make the profiles of public instead of forwarding to a login screen. My .htaccess code is below...

Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /

ErrorDocument 404 https://corriv.com/sources/not-found.php          
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{THE_REQUEST} \s/+(.+?)\.php[\s?] [NC]
RewriteRule ^ /%1 [R=302,NE,L]

RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*)index\.php$ /$1 [L,R=302,NC,NE]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]

RewriteRule ^status/([\w-]+)/?$ status.php?msgID=$1 [L,QSA]
RewriteRule ^hashtag/([^/]+)/?$ hashtags.php?tag=$1 [L,QSA]
RewriteRule ^settings/([\w-]+)/?$ settings.php?set=$1 [L,QSA]
RewriteRule ^account/([\w-]+)/?$ sources/index.php?get=$1 [L,QSA]
RewriteRule ^dashboard/([\w-]+)/?$ admin/index.php?set=$1 [L,QSA]
RewriteRule ^profile/([^/]+)/?$ profile.php?username=$1 [L,QSA,NC]  
RewriteRule ^profile/(followers|friends|saved)/([^/]+)/?$ $1.php?username=$2 [L,QSA,NC]

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+?)/?$ $1.php [L] 

<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin '*'
</IfModule>

I also would appreciate any help with a link to a tutorial on how to learn to code in .htaccess mod rewrite.