[SOLVED] Leading slashes lead to page not found.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ipb1024-ipb
Forum Newbie
Posts: 4
Joined: Fri Jun 25, 2004 11:48 am

Leading slashes lead to page not found.

Post by ipb1024-ipb »

Hello,

I was wondering if anybody could help me with php or apache configuration to tackle the leading slashes. I want to create SE friendly dynamic pages without using querystrings.

http://www.myserver.com/index.php/t20.html

How do I configure on my linux machine to make apache send the request to the php file (index.php). This works fine on windows xp. I am using apache and php (sapi dll).

On linux apache generates a page not found as the apache is actually looking for a file with name t20.html and treating index.php as a folder.

Any help would be appreciated.

Regards,
Pep
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Do you have Apache 2.0 installed on your linux box?
ipb1024-ipb
Forum Newbie
Posts: 4
Joined: Fri Jun 25, 2004 11:48 am

Post by ipb1024-ipb »

Yep. I have Apache 2.0 installed on linux.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

then you need to add 'AcceptPathInfo On' to either your global config or .htaccess file. More information available here: http://66.102.9.104/search?q=cache:zISf ... .org&hl=en
ipb1024-ipb
Forum Newbie
Posts: 4
Joined: Fri Jun 25, 2004 11:48 am

Post by ipb1024-ipb »

Thanks very much Weirdan. It worked. :)
Post Reply