Page 1 of 1

Doing a Url Rewrite without using .htaccess?

Posted: Tue Sep 16, 2008 11:51 pm
by jepskiluv
Hello

I am pretty new to php and trying to solve a problem with rewriting Urls. Searching on this subject I found some cool stuff could be done in the .htaccess file. But where my site is hosted the .htaccess file is not allowed. So I am wondering if there is another way to do this?

Thanks

Re: Doing a Url Rewrite without using .htaccess?

Posted: Wed Sep 17, 2008 1:09 am
by Christopher
You can do URLs like: mysite.com/index.php/foo/bar/baz/ then check $_SERVER['PATH_INFO'].

Re: Doing a Url Rewrite without using .htaccess?

Posted: Wed Sep 17, 2008 1:39 am
by jepskiluv
I have considered that, but that will force me to make a re direct for each page I have right? I would like it to be done from kne central place.

Re: Doing a Url Rewrite without using .htaccess?

Posted: Wed Sep 17, 2008 2:53 am
by Christopher
No, it just has the script name in the middle of the URL. If you are using Apache then you don't need anything else.