jaymc Posted December 2, 2007 Share Posted December 2, 2007 I have this code in a htacess file RewriteEngine on RewriteRule ^([^/\.]+)/?$ index.php?user=$1 [L] this allows this access method www.site.com/username to access www.site.com/index.php?user=username Working well, but, usernames that have a full stop in it are causing problems Is there a way around this? Quote Link to comment Share on other sites More sharing options...
marcus Posted December 2, 2007 Share Posted December 2, 2007 Full stop meaning what? RewriteEngine On RewriteRule ^(.*?)$ /index.php?user=$1 [L] Quote Link to comment Share on other sites More sharing options...
jaymc Posted December 2, 2007 Author Share Posted December 2, 2007 www.site.com/username . 2007 So there actually username is username . 2007 The url rewrite doesnt like the dot, takes me to page cannot be displayed Quote Link to comment Share on other sites More sharing options...
marcus Posted December 2, 2007 Share Posted December 2, 2007 Try something like: RewriteEngine On RewriteRule ^([^/]*)/$ /index.php?user=$1 [L] site.tld/user/ Quote Link to comment Share on other sites More sharing options...
jaymc Posted December 2, 2007 Author Share Posted December 2, 2007 Page cannot be displayed http://site.com/L.F.C.%201 or http://site.com/L.F.C. 1 Infact, using that doesnt work for any usernames, even single word ones..? Quote Link to comment Share on other sites More sharing options...
jaymc Posted December 2, 2007 Author Share Posted December 2, 2007 Ok, I've done a little bit of investigating and it definately does not like the full stop From what I gather, it confuses it with the actual file name period (.php) I know many other websites are successful with this, so there must be a way around Hope someone can help, I dont even know what to google for! Quote Link to comment 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.