index.php to domain name only

Posted on 2006-05-21
Last Modified: 2009-12-16
I know that there is a way to rename files, but since I'm not a programmer, I'm not sure what's required.  For now, I need to create an index.php (it must be php because I want some news feeds on it and I'm using php code to get them there), but I don't want the url to be  I want it to be simply

Can someone tell me (carefully, cuz I don't really know about php but I sure can follow instructions) what to do to make this happen in a manner that will please the search engines?

Question by:linque
    LVL 16

    Accepted Solution

    a very simple way is to use in your links, not index.php. Apache always search for index page, and doesn't show it the url. many web servers do that as well. you'd notice that when you type any url of any site, say, you won't see index.php
    index.php will show when u use a link that links to it e.g. <a href = "index.php">home</a> if u change this to
    <a href = "">home</a> it should do it

    there is a more advanced way, using apache mods, which can omit the file name alltogether. if u need that method, i'll give u all details

    Author Comment

    I *am* interested - if you don't mind - maybe a straightforward tutorial or else a general explanation so I could try to understand.  Anyway, I will accept your current answer and thank you
    LVL 16

    Expert Comment

    there is a way where apache handels this quite well, e.g. //<- long url

    is considered as

    this search engin friendly and easy to remomber by users. this is done via mode rewrite in apache. here is a nice article regarding this issue

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now