Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Can't Get RewriteRule to Rewrite


ccDan - 5:13 pm on Jun 25, 2008 (gmt 0)


I'm trying to create a more manageable URL for people. The dynamic URL would be in the form of:

http://www.example.com/index.php?name=Firstname.Lastname

The "easy" URL I want is:

http://www.example.com/Firstname.Lastname

Here is what I've tried:

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^/([a-z]+)\.([a-z]+)$ http://www.example.com/index.php?name=$1.$2 [NC]
RewriteRule ^/(.*)\.(.*)$ http://www.example.com/index.php?name=$1.$2 [NC]
RewriteRule ^/([^/]+)\.([^/]+)$ http://www.example.com/index.php?name=$1.$2 [NC]

RewriteRule ^/([a-z]+)\.([a-z]+)$ /index.php?name=$1.$2 [NC]
RewriteRule ^/(.*)\.(.*)$ /index.php?name=$1.$2 [NC]
RewriteRule ^/([^/]+)\.([^/]+)$ /index.php?name=$1.$2 [NC]

None of these have worked. Is it not possible to use the . as a separator? I've seen other sites doing it, but maybe they're not doing it with htaccess.

[edited by: jdMorgan at 5:41 pm (utc) on June 25, 2008]
[edit reason] example.com [/edit]


Thread source:: http://www.webmasterworld.com/apache/3683277.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com