Search

I am running Symphony in a site’s root directory, and I need to create a redirect that strips the name of a folder from URLs. However, the htaccess rules for Symphony seem to intercept the redirect at some point, and I don’t know enough to figure out where.

Concretely, I’d like to strip the /blog directory from any URLs.

For example, http://example.tld/blog/one.html would 301 redirect to http://example.tld/one.html.

The syntax I’d normally use is:

RedirectMatch permanent ^/blog/.*$ http://example.tld

But when added to the htaccess file, that line redirects to http://example.tld/?page=one.html

Do you need to set the [L] flag so that it’s the last rule applied?

Be aware: in .htaccess the [L] flag causes mod_rewrite to run all instructions again. Although together with a [R], it doesn’t. :-D

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details