How do you do this?
http://domain.com/users/jdoe/2004/12/5.html ->
http://domain.com/etc/profile.php?user=jdoe&id=5
Rewriteengine on
RewriteRule ^users/([a-z]+)-([0-9]+)/.+\.html$ /etc/profile.php?user=$1&id=$2 [L]
RewriteRule ^users/([a-z]+)/.+\.html$ /etc/profile.php?user=$1&id=5 [L]
RewriteEngine on
RewriteRule ^users/([0-9A-Za-z_]+)/+\.html$ /myfiles/etc/profile.php?user=$1&id=$2 [L]
DirectoryIndex index.html
RewriteRule ^users/([0-9A-Za-z_]+)/+\.html$ /myfiles/etc/profile.php?user=$1&id=$2 [L]
RewriteRule ^users/([0-9A-Za-z_]+)/.+\.html$ /myfiles/etc/profile.php?user=$1&id=$2 [L]
AllowOverride FileInfo
AllowOverride all
You can use mod_rewrite also in the httpd.conf (in <Directory C:\apache\htdocs\> ), but than you've to useI'm not sure if I should be putting these files in some conf file (within the local path: C:\apache\conf\) instead, or what
RewriteRule ^/myfiles/users/([0-9A-Za-z_]+)/.+\.html$ /myfiles/etc/profile.php?user=$1&id=$2 [L]
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 18 guests