Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   htaccess redirect problem (http://www.go4expert.com/forums/htaccess-redirect-problem-t14574/)

rekha 16Oct2008 13:46

htaccess redirect problem
 
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

shabbir 16Oct2008 19:00

Re: htaccess redirect problem
 
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]


rekha 17Oct2008 09:42

Re: htaccess redirect problem
 
Thanks for your reply.But still it is not working.

shabbir 17Oct2008 15:54

Re: htaccess redirect problem
 
What is the error?

rekha 17Oct2008 17:12

Re: htaccess redirect problem
 
Hi,

No error occurs.The file is not redirecting.

Pls help...

Regards
Rekha

shabbir 18Oct2008 09:47

Re: htaccess redirect problem
 
Does your web server support .htaccess and if yes how you know it?

rekha 18Oct2008 09:53

Re: htaccess redirect problem
 
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.

rekha 31Oct2008 14:59

Re: htaccess redirect problem
 
Hi,

Pls solve this issue...

shabbir 31Oct2008 18:31

Re: htaccess redirect problem
 
Try redirecting your domain to say google and see if it works

rekha 1Nov2008 09:38

Re: htaccess redirect problem
 
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


All times are GMT +5.5. The time now is 04:47.