5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 867 Views |
-
URL with .html

10 May 2010 at 9:43pm
hi
i'm trying to change the url from /page to /page.html
using this solution
http://www.silverstripe.org/customising-the-cms/show/269222RewriteRule ^/?$ sapphire/main.php?url=/&%{QUERY_STRING} [L]
RewriteRule ^((?:admin|dev|db|Security|images|api|soap|PageComment|processes)(?:/.+)?)$ sapphire/main.php?url=$1&%{QUERY_STRING} [L]
RewriteRule ^(.*)\.html$ sapphire/main.php?url=$1&%{QUERY_STRING} [L]and than in template put %2Ehtml seems to work
<a href="$URLSegment%2Ehtml">$Title</a>
%2Ehtml = .html
but the problem is with editing HTML in CMS
HTML icon doesn't work now and i get errorSorry, it seems you were trying to access a page that doesn't exist.
Please check the spelling of the URL you were trying to access and try again.
Visit www.silverstripe.com to download the CMS -
Re: URL with .html

12 May 2010 at 9:00pm Last edited: 12 May 2010 10:08pm
probably the solution is to change
RewriteRule ^(.*)\.html$ sapphire/main.php?url=$1&%{QUERY_STRING} [L]
to
RewriteRule ^\.html$ sapphire/main.php?url=$1&%{QUERY_STRING} [L]
| 867 Views | ||
|
Page:
1
|
Go to Top |

