Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I want to rewrite a url to static query as:

xxx.com/register => xxx.com/login.php?page=register

I'm using this:

RewriteRule ^register login.php?page=register [NC,L]

share|improve this question

1 Answer

Use it like this:

RewriteEngine On

RewriteRule ^(register)/?$ /login.php?page=$1 [NC,L,QSA]
share|improve this answer
 
it is not working, redirecting to login.php –  Jinendra Khobare 2 hours ago
 
this line is creating problem :- RewriteRule ^([A-Za-z0-9-\.]+)/?$ profile.php?profileId=$1 [NC,L] –  Jinendra Khobare 2 hours ago
 
OK edited, can you try now? –  anubhava 24 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.