Hey there Contao community!
Is there any way to shorten the very ugly url's in contao?
i.e. http://my-domain-name/index instead of http://my-domain-name/index.php/index.html
This is very important for me, beause of user-friendliness
Hey there Contao community!
Is there any way to shorten the very ugly url's in contao?
i.e. http://my-domain-name/index instead of http://my-domain-name/index.php/index.html
This is very important for me, beause of user-friendliness
Hi,
sure there is. You have to rename .htaceess.default in the root directory to .htaccess (for the rewrite rules) and then Settings/Front end configuration/Rewrite URLs
Jan
Free support only here in the forum.
Please report bugs for my extensions using http://www.contao-forge.org. Thanks!
Requests for Contao support and development please send mail to jan@theofel.de
You can also get rid of the .html suffix. It is also a setting made at the settings page and a change in the .htaccess file. Instructions on how to change the htaccess file are in the bottom of the file itself.
Ok, thank you - I'll try that
Hi again!
I have tried to do what you said and have altered the settings in the backend, but I can't seem to figure out how to get the mod_rewrite to work :?
I have done as you said jan.theofel, but it does not work. Should I alter something in the .htaccess file?
There is one thing you need to check... Mod_rewrite is an Apache module which is not available for IIS. If you are on IIS there is another method, but it takes some more effort.
This is something I copied from my own post here:
To get URL rewrite working you could look at: viewtopic.php?f=4&t=2504
This was written for an older Contao version. The rewrite rules might need some adjusting.Originally Posted by Ruud
Thank you, but I am currently running apache 2.2.8 so that is unfortunately not the problem :/
EDIT: FYI I'm getting a 404 error - not "page not found"
Can you test if mod_rewrite itself is installed correctly.
It seems that it is, because I can easily remove the ".html" extension withour any trouble. But when I remove the "index.php" it gives me this error :/ (Sorry I didn't mention this in the earlier post)
Hello,
Getting rid of ".html" is a Contao thing, not a rewrite thing. As your hoster if mod_rewrite is active and if you can use it inside your .htaccess file.Originally Posted by KristianK
Jan
Free support only here in the forum.
Please report bugs for my extensions using http://www.contao-forge.org. Thanks!
Requests for Contao support and development please send mail to jan@theofel.de
That seemed to be the problem Thank you!
To anyone else having this "problem" here is what I did:
- Edit the settings to rewrite urls (under settings -> Front end konfiguration)[/*:2vt1q16u]
- Edit the .htaccess.default to .htaccess[/*:2vt1q16u]
- Make sure .htaccess is enabled on your server (which is NOT the case on AppServ!)[/*:2vt1q16u]
Bookmarks