Issue with 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
chigs123
Forum Newbie
Posts: 3
Joined: Thu Apr 20, 2006 7:34 am

Issue with url

Post by chigs123 »

Hello Guys,

I am using linux and apache server
I want to access my index.php page without .php extension
for e.g

http://www.example.com/index.php

This is the normal way to access the index.php

Now I want to access the same index.php page by writing following url

http://www.example.com/index

Do anybody have any hint regarding this issue
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

chigs123
Forum Newbie
Posts: 3
Joined: Thu Apr 20, 2006 7:34 am

Re: Issue with url

Post by chigs123 »

Thnx to reply

I tried it but didnt get success. Can you explain me by giving an example, if its possible

Thank you
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Issue with url

Post by Chris Corbyn »

chigs123 wrote:Thnx to reply

I tried it but didnt get success. Can you explain me by giving an example, if its possible

Thank you
Make sure you have mod_rewrite support compiled into apache. Then in httpd.conf or .htaccess:

Code: Select all

RewriteEngine On

RewriteRule ^(.+)$  $1.php
chigs123
Forum Newbie
Posts: 3
Joined: Thu Apr 20, 2006 7:34 am

Re: Issue with url

Post by chigs123 »

Thnx buddy

Still not able to get the result

I checked mod_rewrite is instatlled on server

Thank you for you reply, and tell me if there is another way or anything else that I might doing wrong

Regards
Chirag
Post Reply