Title: Redirect empty path
Last modified: December 13, 2021

---

# Redirect empty path

 *  Resolved [marcbenfie](https://wordpress.org/support/users/marcbenfie/)
 * (@marcbenfie)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/redirect-empty-path/)
 * I want to redirect from “<domain>/” to “<domain>/mobile-landingpage” if the user
   is on mobile and it is not working.
 * I tried alot of ways, like just a “/” in the url or “^\/$” as Regex and it just
   would not work. But its definetly just a “path-matching-issue”
 * Other pages, where I seperated mobile with desktop, which hat a path worked without
   problems with the user-agent, so the user-agent ist not the problem
    -  This topic was modified 4 years, 6 months ago by [marcbenfie](https://wordpress.org/support/users/marcbenfie/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/redirect-empty-path/#post-15162887)
 * The source for the root is ‘/’
 *  Thread Starter [marcbenfie](https://wordpress.org/support/users/marcbenfie/)
 * (@marcbenfie)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/redirect-empty-path/#post-15169131)
 * You are actually right. It inconsitently does not work in my case though, which
   was the reason why I suspected the url match I wrote was wrong.
    I am not sure
   why and how, but it seems to have conflicts sometimes which caching / loading
   scripts from Divi.
 * I just have put a redirection javascript into the head of the respective wordpress
   page, to capture the cases where it does not consistently work and redirect the
   user after loading the head to the mobile version.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Redirect empty path’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [marcbenfie](https://wordpress.org/support/users/marcbenfie/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/redirect-empty-path/#post-15169131)
 * Status: resolved