Can I not have the .phtml?
Posted: Tue 22. Mar 2005, 04:25
I wish I'm better with mod_rewrite. I have made attempt after attempt, I'm trying to make the system to generate URLs without .phtml at the back.
Like, instead of "domain.com/0.1.0.0.0.1.phtml", I would like to have just "domain.com/0.1.0.0.0.1"
The only file I found that contains the text "phtml" is "front.func.inc.php", so I find and replace the lines
to
Then I know I should not forget to edit .htaccess too, so I went and change this line:
to
and this line:
to
Thinking it should work by now? NO! The page went looping forever. So what do you think I have missed? Or is this not possible?
Thoughts? Suggestions?
Like, instead of "domain.com/0.1.0.0.0.1.phtml", I would like to have just "domain.com/0.1.0.0.0.1"
The only file I found that contains the text "phtml" is "front.func.inc.php", so I find and replace the lines
Code: Select all
$file = str_replace(',', '.', $noid).'.phtml';
Code: Select all
$file = str_replace(',', '.', $noid);
Code: Select all
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.phtml$ index.php?id=$1.$2.$3.$4.$5.$6
Code: Select all
RewriteRule ^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$ index.php?id=$1.$2.$3.$4.$5.$6
Code: Select all
RewriteRule ^(.+)\.phtml$ index.php?$1
Code: Select all
RewriteRule ^(.+)$ index.php?$1
Thoughts? Suggestions?