Jump to content


Photo

Redirecting


  • Please log in to reply
1 reply to this topic

#1 a1drich

a1drich
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 22 September 2006 - 03:26 AM

hello to all.

may anybody teach me how to redirect. For example, everytime i go to http://localhost/ , instead of it showing apache "It Works!" it redirects to/or displays http://localhost/index.php.

and on http://localhost/administrator, it redirects automatically or displays  http://localhost/adm...rator/index.php

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 23 September 2006 - 09:45 AM

For removing the 'It Works' page when you goto http://localhost/ remove all the Apache html files from the htdocs folder that start with index.html.x - x being the abbriviated language, eg index.html.en and any files prefixed with apache_ eg: apache_pb2.gif

For your secound question you'll need to edit the httpd.conf file and find the following:
DirectoryIndex index.html index.html.var
Change the above line to this:
DirectoryIndex index.html index.html.var index.php
Save the httpd.conf file and restart the Apache server. Now when you go to http://localhost/administrator/ it should automatically loadup the index.php page. This affects any other folder to. So fi you goto http://locahost/somefolde/ Apache will automatically look for a index file listed in the DirectoryIndex directive.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users