How do i change-
/profile.php?username=username
to-
/profile/username
Thanks.
EDIT: I've tried the code below but I get error 500
RewriteEngine on
RewriteRule ^/profile.php?username=(.*) /profile/$1 [PT]

How do i change-
/profile.php?username=username
to-
/profile/username
Thanks.
EDIT: I've tried the code below but I get error 500
RewriteEngine on
RewriteRule ^/profile.php?username=(.*) /profile/$1 [PT]
Last edited by Decode; 28-08-2008 at 12:22 PM.
Lets set the stage on fire, and hollywood will be jealous.
RewriteEngine on
RewriteRule ^profile/([A-Za-z0-9-]+)/?$ profile.php?username=$1 [L]
You got it mixed up a little bit, that should work.
Rewrite Engine On
RewriteRule ^profile/([^\/]+)/?$ /profile.php?username=$1 [L]
i fink
no
I've just tried both of them and they don't work. Maybe its a problem with my localhost :S
Anyway +rep for helping![]()
Lets set the stage on fire, and hollywood will be jealous.
Possibly, it doesn't work on my hosting :p
no
anyone know how to get this working with apache2?
Tried to get it working for ages and have had no luck, every time i try, apache seems to stop responding![]()
![]()
So A Kiss Is Out Of The Question Then..?
♥ My Boy <sinlge> Tbh ♥
This love isn't good unless it's me and you
Complicated is the whole point. x
Theres nothing scarier than getting something you want because then you have something to lose..
Im using apche2 but its sort of built into wamp, I think there must be a config file somewhere with all of the options in, but on wamp you can just change them through a menu.
Lets set the stage on fire, and hollywood will be jealous.
httpd.conf should be inside the conf or apache directory. Just find it.
You should see an option for the rewrite module, turn it on, if the modules wasn't compiled with Apache, you may have to compile it again.
Want to hide these adverts? Register an account for free!