ninevolt Posted February 11, 2008 Share Posted February 11, 2008 RewriteEngine On #make the index work RewriteRule ^$ index.php #finds http://aardvarkspace.aardvarkforum.com/j.love #then turns it into http://aardvarkspace.aardvarkforum.com/j.love/ #checks if there is no slash on the end RewriteCond %{REQUEST_URI} !/$ #rewrites with the slash RewriteRule (^[-_A-Za-z0-9\ ].[-_A-Za-z0-9\ ]*)$ /$1/ [R=301,L] #Typical error document handler ErrorDocument 404 /notfound.php #if you go to http://aardvarkspace.aardvarkforum.com/j.love/ this makes it work RewriteCond %{REQUEST_URI} ^(.*)/ RewriteRule ^([^/]*)/$ member.php?username=$1 See how it has [-_A-Za-z0-9\ ].[-_A-Za-z0-9\ ] well its looking for period in the center somewhere When I try to make it look for EVERYTHING (including periods since usernames can have them), it just makes the thing go into an infinite loop or something Right now it can get j.love as a username but not a.b.c. as a username since that has multiple periods in it Quote Link to comment https://forums.phpfreaks.com/topic/90570-htaccess-periods/ Share on other sites More sharing options...
powerspike Posted February 15, 2008 Share Posted February 15, 2008 [-_A-Za-z0-9\ \.] try that instead =) (instead of [-_A-Za-z0-9\ ].[-_A-Za-z0-9\ ]) Quote Link to comment https://forums.phpfreaks.com/topic/90570-htaccess-periods/#findComment-467384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.