Doing a Url Rewrite without using .htaccess?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
jepskiluv
Forum Newbie
Posts: 2
Joined: Tue Sep 16, 2008 11:46 pm

Doing a Url Rewrite without using .htaccess?

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Doing a Url Rewrite without using .htaccess?

Post by Christopher »

You can do URLs like: mysite.com/index.php/foo/bar/baz/ then check $_SERVER['PATH_INFO'].
(#10850)
jepskiluv
Forum Newbie
Posts: 2
Joined: Tue Sep 16, 2008 11:46 pm

Re: Doing a Url Rewrite without using .htaccess?

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Doing a Url Rewrite without using .htaccess?

Post 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.
(#10850)
Post Reply