php and .htaccess problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
os_bug
Forum Newbie
Posts: 2
Joined: Wed Oct 11, 2006 4:01 am

php and .htaccess problem

Post 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.
User avatar
ibbo
Forum Commoner
Posts: 51
Joined: Tue Sep 19, 2006 6:20 am

Post 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
Post Reply