htaccess redirect problem

Contributor
16Oct2008,13:46   #1
rekha's Avatar
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
Go4Expert Founder
16Oct2008,19:00   #2
shabbir's Avatar
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]
Contributor
17Oct2008,09:42   #3
rekha's Avatar
Thanks for your reply.But still it is not working.
Go4Expert Founder
17Oct2008,15:54   #4
shabbir's Avatar
What is the error?
Contributor
17Oct2008,17:12   #5
rekha's Avatar
Hi,

No error occurs.The file is not redirecting.

Pls help...

Regards
Rekha
Go4Expert Founder
18Oct2008,09:47   #6
shabbir's Avatar
Does your web server support .htaccess and if yes how you know it?
Contributor
18Oct2008,09:53   #7
rekha's Avatar
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.
Contributor
31Oct2008,14:59   #8
rekha's Avatar
Hi,

Pls solve this issue...
Go4Expert Founder
31Oct2008,18:31   #9
shabbir's Avatar
Try redirecting your domain to say google and see if it works
Contributor
1Nov2008,09:38   #10
rekha's Avatar
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