Index – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Thu, 22 Aug 2019 08:35:12 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Change Apache Default Page with htaccess https://tecadmin.net/change-default-index-page-htaccess/ https://tecadmin.net/change-default-index-page-htaccess/#respond Wed, 02 Aug 2017 04:41:33 +0000 https://tecadmin.net/?p=13311 Q. How to Change the Default Index Page with .htaccess in Apache? How to Set the default index page using .htaccess? How to configure the specific page to use as default page with .htaccess? This tutorial will help you to change the default page in the .htaccess file. To do this first make sure you [...]

The post How to Change Apache Default Page with htaccess appeared first on TecAdmin.

]]>
Q. How to Change the Default Index Page with .htaccess in Apache? How to Set the default index page using .htaccess? How to configure the specific page to use as default page with .htaccess?

This tutorial will help you to change the default page in the .htaccess file. To do this first make sure you are using Apache web server and you have enabled .htaccess for the virtual host. Let’s edit the .htaccess file on your website document root and add a DirectoryIndex entry followed by file name. Now Apache will use this file as your default file.

#Default index page

DirectoryIndex home.html

You can also define more than one file like below. In this Apache will serve one of below file default file.

#Multiple default index page 

DirectoryIndex home.html index.html index.php index.htm

The post How to Change Apache Default Page with htaccess appeared first on TecAdmin.

]]>
https://tecadmin.net/change-default-index-page-htaccess/feed/ 0
How to Create, List or Drop Indexes on MySQL Table https://tecadmin.net/create-list-drop-indexes-mysql-table/ https://tecadmin.net/create-list-drop-indexes-mysql-table/#respond Sun, 03 Apr 2016 04:31:46 +0000 https://tecadmin.net/?p=10051 Indexes are very useful to improve search queries on database tables. For example you are searching for particular record in a database table having millions of records. You will find that search queries taking very less time on tables having indexes enables. CREATE INDEX:- This will creates index on mysql table. This will allow duplicate [...]

The post How to Create, List or Drop Indexes on MySQL Table appeared first on TecAdmin.

]]>
Indexes are very useful to improve search queries on database tables. For example you are searching for particular record in a database table having millions of records. You will find that search queries taking very less time on tables having indexes enables.

CREATE INDEX:-

This will creates index on mysql table. This will allow duplicate values also.

CREATE INDEX index_name ON table_name (COLUMN_NAME1, COLUMN_NAME2, ...)

CREATE UNIQUE INDEX:-

This will creates index on mysql table. With uses of UNIQUE keyword this will not allow duplicate values.

CREATE UNIQUE INDEX index_name ON table_name (COLUMN_NAME1, COLUMN_NAME2, ...)

1. CREATE INDEX Examples:-

For this example I have a table named Users with thousands of records in mysql database. The table structure is as following in screenshot.

mysql-index-1

Now use following command to create index named Users_Idx1 on table Users based on column username.

mysql> CREATE INDEX Users_Idx1 ON Users (username);

Use UNIQUE keyword with the query to create index with unique records.

mysql> CREATE UNIQUE INDEX Users_Idx1 ON Users (username);

2. SHOW INDEX Examples:-

Use following sql command to list all indexes for a mysql table. The below query will delete Users_Idx1 index from Users table in current database.

mysql> SHOW INDEX FROM Users;

mysql-index-2

3. DELETE INDEX Examples:-

Use following sql command to delete index on mysql table.

mysql>  ALTER TABLE Users DROP INDEX Users_Idx1;

The post How to Create, List or Drop Indexes on MySQL Table appeared first on TecAdmin.

]]>
https://tecadmin.net/create-list-drop-indexes-mysql-table/feed/ 0
How to Set Default Document in IIS https://tecadmin.net/set-default-document-in-iis/ https://tecadmin.net/set-default-document-in-iis/#comments Tue, 12 May 2015 00:38:54 +0000 https://tecadmin.net/?p=7785 The default document is the file which is served by web server when no file name is specified by user in web url. By default most of web servers uses index.html, index.htm, default.html, default.htm, default.aspx, etc file names as default document if no default document is specified for the website. This article will help you [...]

The post How to Set Default Document in IIS appeared first on TecAdmin.

]]>
The default document is the file which is served by web server when no file name is specified by user in web url. By default most of web servers uses index.html, index.htm, default.html, default.htm, default.aspx, etc file names as default document if no default document is specified for the website.

This article will help you to set default document in IIS for any website configured. To do it follow the below step by step instruction’s:

1. Start IIS

Go to run window and type “inetmgr” and hit enter to open IIS web server in your windows system.

start-iis-on-windows

2. Select Default Document Option

Now go under sites option in left side bar and select your site. Now click on “Default Document” option as per showing in below screenshot.

2015-04-25_0908_001

3. Enter Default Page Name

  • Now you will show a list of pages which is globally set as default document for your website.
  • Now click on Add button in right sidebar.
  • It will show a pop-up. Enter your filename to set as default document and click OK.

2015-04-25_0909

4. Set Top in Priority Order

No Select your new filename entered and put it at top of priority order by using “Move Up” button in actions side bar.

2015-04-25_0909_001

Now your default document has been correctly configured for your website in IIS web server.

The post How to Set Default Document in IIS appeared first on TecAdmin.

]]>
https://tecadmin.net/set-default-document-in-iis/feed/ 1