Title: WP_Rewrite::using_index_permalinks
Published: April 25, 2014
Last modified: April 28, 2025

---

# WP_Rewrite::using_index_permalinks(): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#description)
 * [Return](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#return)
 * [More Information](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#wp--skip-link--target)

Determines whether permalinks are being used and rewrite module is not enabled.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#description)󠁿

Means that permalink links are enabled and index.php is in the URL.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#return)󠁿

 bool Whether permalink links are enabled and index.php is in the URL.

## 󠀁[More Information](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#more-information)󠁿

Returns true if your blog is using PATHINFO permalinks.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#source)󠁿

    ```php
    public function using_index_permalinks() {
    	if ( empty( $this->permalink_structure ) ) {
    		return false;
    	}

    	// If the index is not in the permalink, we're using mod_rewrite.
    	return preg_match( '#^/*' . $this->index . '#', $this->permalink_structure );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-rewrite.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-rewrite.php#L366)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-rewrite.php#L366-L373)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#related)󠁿

| Used by | Description | 
| [get_rest_url()](https://developer.wordpress.org/reference/functions/get_rest_url/)`wp-includes/rest-api.php` |

Retrieves the URL to a REST endpoint on a site.

  | 
| [paginate_links()](https://developer.wordpress.org/reference/functions/paginate_links/)`wp-includes/general-template.php` |

Retrieves paginated links for archive post pages.

  | 
| [create_initial_taxonomies()](https://developer.wordpress.org/reference/functions/create_initial_taxonomies/)`wp-includes/taxonomy.php` |

Creates the initial taxonomies.

  | 
| [get_pagenum_link()](https://developer.wordpress.org/reference/functions/get_pagenum_link/)`wp-includes/link-template.php` |

Retrieves the link for a page number.

  | 
| [WP_Rewrite::init()](https://developer.wordpress.org/reference/classes/wp_rewrite/init/)`wp-includes/class-wp-rewrite.php` |

Sets up the object’s properties.

  | 
| [WP_Rewrite::using_mod_rewrite_permalinks()](https://developer.wordpress.org/reference/classes/wp_rewrite/using_mod_rewrite_permalinks/)`wp-includes/class-wp-rewrite.php` |

Determines whether permalinks are being used and rewrite module is enabled.

  | 
| [redirect_canonical()](https://developer.wordpress.org/reference/functions/redirect_canonical/)`wp-includes/canonical.php` |

Redirects incoming links to the proper URL based on the site url.

  | 
| [url_to_postid()](https://developer.wordpress.org/reference/functions/url_to_postid/)`wp-includes/rewrite.php` |

Examines a URL and try to determine the post ID it represents.

  |

[Show 3 more](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_rewrite/using_index_permalinks/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_rewrite%2Fusing_index_permalinks%2F)
before being able to contribute a note or feedback.