PDA

View Full Version : Is it possible to output .php or .shtml instead of .html?


bustherh
01-04-2007, 02:23 AM
When I create a new category the script creates a page at whatever.com/category/index1.html.
Is it possible to have it create index1.shtml or index1.php instead of .html?

bunny
01-04-2007, 04:30 AM
Just disable mod_rewrite option and all files will be via .php extensions.

bustherh
01-04-2007, 06:21 AM
OK I tried disabling mod_rewrite from the .htaccess file. then none of my category links worked.
I am thinking I need to change these lines in index.php:
$gDirSmarty->assign('url', $gDirConfig['base'].$gDirConfig['dir'].$category['path'].'/index%1.php');
And in util.php:
$url = (1 == $page) ? preg_replace('/index%1.php/', '', $aParams['aTemplate']) : preg_replace('/%1/', $page, $aParams['aTemplate']);
$out .= "<a href=\"{$url}\">{$gDirLang['page']} {$page}</a> ";
And:
$url1 = (1 == $prev) ? preg_replace('/index%1.php/', '', $aParams['aTemplate']) : preg_replace('/%1/', $prev, $aParams['aTemplate']);
$url2 = preg_replace('/index%1.php/', '', $aParams['aTemplate']);
Am I on the right track?

Greg
01-04-2007, 04:17 PM
bustherh

If you have the ProVersion you can disable mod_rewrite from admin panel.

Admin Panel » Configuration » General Configuration
Apache mod_rewrite module - pick "disabled"
Save changes

bustherh
01-07-2007, 08:59 PM
Thanks. I finally figure out what to do.