Jump to content

.htaccess periods


ninevolt

Recommended Posts

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 :(

 

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.