Jump to content

Redirecting


a1drich

Recommended Posts

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/administrator/index.php
Link to comment
Share on other sites

For removing the 'It Works' page when you goto http://localhost/ remove all the Apache html files from the htdocs folder that start with [b]index.html.[i]x[/i][/b] - 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:
[code]DirectoryIndex index.html index.html.var[/code]
Change the above line to this:
[code]DirectoryIndex index.html index.html.var index.php[/code]
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.