Jump to content
The Uniform Server Community

uniform server main page


Recommended Posts

Need help, is it possible to change the main page of the uniform server in /www/index.php ?? to something

else maybe like ex: console.php


if i do like the above will there be any complications ?.. :(

Jeret Christopher WEB DESIGNER
Link to comment
Share on other sites

Good question, with multiple answers, depending on what you really want to do. First, yes, you can change the initial page displayed, and there are various techniques to do it. However, I have to ask what your goal is for this; what is the behavior you're trying to create?


Since the default action for UniServer's server start in the tray tool is to execute index.php, I assume that instead you want it to go instead to your program, which is "console.php." Now, the default index.php displays a lot of information about The Uniform Server makeup and status, and also has several links to other pages and sites. One of these goes to the Administrator panel, which is in home\admin\www. Was one of these two pages what you intended by the term "console.php"?


In any case, one choice is to just replace the contents of index.php with what you would put in console.php. This essentially puts your code into the file which gets executed automatically. It's what I think is the best solution. You can also rename the current index.php to uniserver.php, thus preserving the code, which you can link to from your application, if desired.


Another technique would be to use a redirect in the .htacces file. See the Wiki for details on this:


The good thing about this method is that it's very easy to change, very specific, and is quite portable. The redirect merely looks for a request for index.php and changes it to console.php, but just for the one directory.


I don't recommend you do this next one, since it's a global change for a local effect. It's also usually not repeatable on hosting services.

The search order for index pages to be displayed is governed by the DirectoryIndex directive in the httpd.conf file, which is in C:\UniServer\usr\local\apache2\conf (normally). Mine looks like:

DirectoryIndex index.html index.shtml index.html.var index.htm index.php3 index.php index.pl index.cgi

The first file that matches (from left to right) will be executed by the server. There are more details to this, but that's the essence. So one thing you could do is to add "console.php" to the start of this directive. Again, less than optimal.


This next one is more detailed, since it gets into the details of UniCom, the Start.exe program, which is quite powerful. There are many things you can change. See the Wiki and the code for more details. The default sequence of operation is that when the Apache server is started, its first task is to display Uniserver\home\admin\www\redirect.html, which displays The Uniform Server splash screen and then jumps to index.php. You *might* change this to go to console.php, but when a new version of UniServer comes out (Ric is a busy lad), you'll have some work to do putting in the update. It also may create other problems, so again, it's less than optimal.


Hope that helps,


Link to comment
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...