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…') |
|||
Line 1: | Line 1: | ||
− | {{ | + | {{stub}} |
=Itroduction= | =Itroduction= | ||
Line 6: | Line 6: | ||
=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> | ||
+ | ## | ||
+ | # 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> |
Revision as of 22:22, 18 February 2011
Incomplete Article: This article is not finished yet and needs expansion.
Please expand it and remove this notice when it is finished. |
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
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:
## # 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