Can I access directly to database or table pages?

Yes. Out of the box, you can use URL like http://server/phpMyAdmin/index.php?server=X&db=database&table=table&target=script. For server you use the server number which refers to the order of the server paragraph in config.inc.php. Table and script parts are optional.

If you want http://server/phpMyAdmin/database[/table][/script] URL, you need to do some configuration. Following lines apply only for Apache web server. First make sure, that you have enabled some features within global configuration. You need Options FollowSymLinks and AllowOverride FileInfo enabled for directory where phpMyAdmin is installed and you need mod_rewrite to be enabled. Then you just need to create following .htaccess file in root folder of phpMyAdmin installation (don’t forget to change directory name inside of it):

RewriteEngine On
RewriteBase /path_to_phpMyAdmin
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&table=$2&target=$3 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]

Table of Contents

  1. Introduction
    1. My version
    2. See Also

My version

Instead of that, use this version. Just stick in the .htaccess file in the phpMyAdmin directory.

RewriteEngine On
RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [S=4]

RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ /index.php?db=$1&table=$2&target=$3 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ /index.php?db=$1&target=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/?$ /index.php?db=$1&table=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/?$ /index.php?db=$1 [R]

See Also

  • https://phpmyadmin.readthedocs.org/en/latest/faq.html
  • http://docs.phpmyadmin.net/en/latest/config.html

phpMyAdmin Shortcuts with .htaccess - AskApache

Charles Torvalds
14 Feb 2013

phpMyAdmin, RewriteRule

  • Site Map WireShark GNU Non-GNU Tor Project cURL TLDP - Documentation
  • Htaccess Files Hacking Htaccess Javascript Linux Optimization PHP Security Shell Scripting WordPress
  • Base64 Image Converter Raw HTTP Header Debugger Graphical ASCII Text Generator Mac Address Vendor Lookup Who Am I – Your IP Information Request Method Security Scanner .htpasswd file Generator Compress CSS DNS Tracer
Copyright © 2025 AskApache
  • Site Map
  • Htaccess Files
  • Hacking
  • Htaccess
  • Javascript
  • Linux
  • Optimization
  • PHP
  • Security
  • Shell Scripting
  • WordPress
  • Base64 Image Converter
  • Raw HTTP Header Debugger
  • Graphical ASCII Text Generator
  • Mac Address Vendor Lookup
  • Who Am I – Your IP Information
  • Request Method Security Scanner
  • .htpasswd file Generator
  • Compress CSS
  • DNS Tracer
Exit mobile version