Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Site-wide redirect?

Participant ,
May 18, 2014 May 18, 2014

Hello,

Does anyone know of a way to apply a site-wide redirect? For maintenance, purposes is what I'm going for. That way if a user accesses the site from a search term or bookmark, to www.site.com/directory/somepage.html, it can be auto-forwarded to /maintenance.html? I know about the individual page redierects, but if a site is content heavy, I don't want to redirect 400 pages individually and then have to undo it all again. I've done this with .htaccess files but, to my knowledge, we can't access BC .htaccess.

Thoughts or ideas?

TOPICS
Content management and modules
323
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 22, 2014 May 22, 2014
LATEST

BC can't do it, but Javascript can.

You can check document.location.pathname for a match (e.g., starts with '/directory/'), then replace it. Some info here: url - jQuery if Location.Pathname contains - Stack Overflow

Chuck the code in a content holder, then insert that content holder in the relevant templates.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines