Page 1 of 1

php and .htaccess problem

Posted: Wed Oct 11, 2006 4:06 am
by os_bug
hello ,

I have written the .htaccess file and is in my doc root.
the rule is something like this.

RewriteRule ^test/?$ /view/os.php
and so on, there are some 100 rules I have written.

now I do not know , how to change the conf file so my php will read the link http://192.168.149.44/test/ and pass it directly to
http://192.168.149.44/view/os.php

can any idea, what are change and where so my PHP/apache will read the .htaccess file and do the stuff.

Posted: Wed Oct 11, 2006 8:20 am
by ibbo
If its a simple redirect then :

Redirect /test/ http://192.168.149.44/view/os.php

should be all you need.

RewriteRule is genrally used for neat URL like :

RewriteRule aid/(.*)/type/(.*)/ ?aid=$1&type=$2

which would make the link http://host.com/articles/aid/512/type/2800/ parse like http://host.com/articles?aid=512&type=2800

So if you simply want to redirect this page to that page then use a redirect instead.

Ibbo