Help me in Rewrite URL

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
deepakonwww
Forum Newbie
Posts: 3
Joined: Thu Sep 13, 2007 11:49 pm

Help me in Rewrite URL

Post by deepakonwww »

Hello PHP Friends,

I need your help in a very crucial Issue.

Basically I am developing my site in PHP.

I want to use URL Rewriting in my site using mode_rewrite.

I want my URL in this way

http://www.mysite.com/development/php/basic/

this url should load the basic.php page from the php directory.

here the important point is if user write something like
http://www.mysite.com/development/php/basic

the slash ("/") should be added automatically to the URL.

and if user writes http://www.mysite.com/development/php

then a slash should be added to the URL and it will load the default.php page from that directory.
here you can assume that every directory contains the default page.

and if user writes http://www.mysite.com/my

then it should add the slash to the URL like this http://www.mysite.com/my/ and load the my.php page.

Hope I have made myself clear.

Please guide me in this regards.

Thanks in Advance....
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Whoa, the manual actually works? ;) Take a look at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html and scroll down to Trailing Slash Problem.
Post Reply