Full-stop at and of url

Hi there,

I didn’t know where I should put this post, but since I programmed the site in PHP this seemed like a good place to start.

So I have designed a site that is dynamically generated. It has a number of users around the country. To login to the site to make changes they have to go to www.example.com/admin.

I had one of the users email me recently because he was getting a 404 not found error.

After a while I realised it was because he was adding a full-stop at the end of the url: /admin.

I thought, ‘silly sausage, he hasn’t even checked what he’s typed in.’ But then I tried adding full-stops to the end of urls like google and sitepoint, and it made no difference. The pages loaded fine.

Can anyone tell me what’s going on here, and how I can add this functionality to my site?

Many thanks,
Mike

That is usually done using a .htaccess file

e.g. Something like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.example\.com/admin)(:80)? [NC]
RewriteRule ^(.*) http://example.com/admin/$1 [R=301,L]