Rewrite URL

From Contao Community Documentation

Stub.png Incomplete Article: This article is not finished yet and needs expansion.

Please expand it and remove this notice when it is finished.

Introduction

To rewrite URL's you just need to do some small settings in the Back-end --> System --> Settings and in the .htaccess file

Requirements

Access to the Website root and be able to change the .htaccess file.

Changes

In Back-end --> System --> Settings you have to mark the field "Rewrite URLs" . Also set the Relative path to the Contao directory under Global configuration to the specific folder ... as example /contao. If you have a root installation (not in a sub-folder installed) you let this field just free.

When you do a installation of Contao you have in the "root-folder" of it a .htaccess.default this has to be renamed in .htaccess . Dont forget to rename the .htaccess to something like .htaccess.old . If you use a sub-folder for your Contao, it needs to be maked in the .htaccess it self too. The Section is:

.htaccess
 
  ##
  # Set the RewriteBase if your Contao installation is in a subdirectoy and
  # the rewrite rules are not working properly. Usage examples:
  #
  #   RewriteBase /contao
  #   RewriteBase /path/to/contao
  #
  # Uncomment the following line to set the RewriteBase.
  ##
  RewriteBase /contao

-- ciao_bello - 19.02.2011

Views
Personal tools

Contao Community Documentation

Navigation
Discover
Understand
Enhance
Miscellaneous
Tools