htaccess redirect problem

rekha's Avatar
Contributor
Hi,

I have a page for example http://yoursite.com/folder/xyz.php.I have to redirect this page to http://yoursite.com/folder/content.php?url=xyz.php.

How can i do this using htaccess.Pls help..


Regards
Rekha
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
here is what you should be doing
Code:
## Only apply for one folder
RewriteCond %{HTTP_HOST} yoursite\.com/\/folder\/$ [NC]
RewriteRule ^([A-Za-z\.]+)$ http://yoursite.com/folder/content.php?url=$1 [QSA,L]
0
rekha's Avatar
Contributor
Thanks for your reply.But still it is not working.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
What is the error?
0
rekha's Avatar
Contributor
Hi,

No error occurs.The file is not redirecting.

Pls help...

Regards
Rekha
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Does your web server support .htaccess and if yes how you know it?
0
rekha's Avatar
Contributor
Hi,

Yes.If i enter some strings in .htaccess file and run it i am getting internal server error.This means that the server is supporting htaccess.
0
rekha's Avatar
Contributor
Hi,

Pls solve this issue...
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Try redirecting your domain to say google and see if it works
0
rekha's Avatar
Contributor
Thanks for ur reply after a long time.When i redirect to some other domain it is working.The issue is when i redirect it to the file which was also in the same folder.This is the problem.


Regards
Rekha