PDA

View Full Version : mod rewrite url question


seco
12-08-2009, 10:41 PM
ok so ive been trying but constantly get a 500 internal server error the way i want it.

here is what im trying to achieve.

http://www.domain.com/index.php?=12345

to

http://www.domain.com/12345

no last slash.

it works with adding the last slash like so

http://www.domain.com/12345/

but it would look better without it.

my current htaccess


Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^/]*)/$ /?u=$1 [L]


if i remove that last slash i get the 500 error

Any ideas?



EDIT:

I figured it out


Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([A-Za-z0-9]+)$ /?u=$1 [L]