Difference between revisions of "Rewrite URL"

From Contao Community Documentation

(Created page with '{{strub}} =Itroduction= To rewrite URL's you just need to do some small settings in the ''' Back-end --> System --> Settings''' and in the .htaccess file =Requirements= Acce…')
 
(Changes)
 
(10 intermediate revisions by one user not shown)
Line 1: Line 1:
{{strub}}
+
{{stub}}
=Itroduction=
+
 
 +
[[Category:Admin_HOWTOS]]
 +
 
 +
=Introduction=
  
 
To rewrite URL's you just need to do some small settings in the ''' Back-end  --> System  --> Settings''' and in the .htaccess file
 
To rewrite URL's you just need to do some small settings in the ''' Back-end  --> System  --> Settings''' and in the .htaccess file
Line 6: Line 9:
 
=Requirements=
 
=Requirements=
  
Access to the Website root and be able to change the .htaccess file.
+
Access to the Website root and be able to change the '''.htaccess''' file.
  
 
=Changes=
 
=Changes=
In ''' Back-end  --> System  --> Settings''' you have to '''mark''' the field ''' "Rewrite URLs" '''.
+
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:
 +
 
 +
<source>
 +
 
 +
.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
 +
</source>
 +
 
 +
----
 +
 
 +
-- [[User:ciaobello|ciao_bello]] - 19.02.2011

Latest revision as of 14:02, 19 February 2011

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