Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove .html from the Friendly URL - Modx?

I'm using MODX Revolution 2.2.4-pl. I'm using the supplied .htaccess file and have friendly URLs turned on. These are my rewrite rules.

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

What do they need to look like to have it remove the .HTML from the URL?

I've been googling this for the past twenty minutes and my solutions have not worked. Thanks

like image 612
Brant Avatar asked Sep 04 '12 16:09

Brant


Video Answer


1 Answers

There is a much easier built in way. Log in to the Manager.

MODX Revolution

2.2.x and earlier: Go to System -> Content Types.

2.3.x and later: Go to Content -> Content Types.

Find HTML and erase what is written in "File Extension". You do this by double clicking .html in the table to activate the editable field. After you have erased the content, clear cache.

MODX Evolution

Go to Tools -> Configuration -> Friendly URLs.

Delete the content in "Friendly URL Suffix". Save and clear cache.

like image 82
OptimusCrime Avatar answered Nov 05 '22 01:11

OptimusCrime