Page 1 of 1

Can I not have the .phtml?

Posted: Tue 22. Mar 2005, 04:25
by deanloh
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

Code: Select all

$file = str_replace(',', '.', $noid).'.phtml'; 
to

Code: Select all

$file = str_replace(',', '.', $noid); 
Then I know I should not forget to edit .htaccess too, so I went and change this line:

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
to

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
and this line:

Code: Select all

RewriteRule ^(.+)\.phtml$ index.php?$1
to

Code: Select all

RewriteRule ^(.+)$ index.php?$1
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?

Posted: Tue 22. Mar 2005, 07:53
by Pappnase
hello

hello

i would say uplaod the latest htaccess from an phpwcms zip file. remove the _ and fine is it ;-)

Posted: Tue 22. Mar 2005, 07:57
by deanloh
Pappnase

When you said latest file, did you mean 1.2.1?

Posted: Tue 22. Mar 2005, 07:59
by Pappnase
deanloh wrote:Pappnase

When you said latest file, did you mean 1.2.1?
ups sorry

i was read your thread to fast! so i see now that you want have the links without phtml!

and that i do never test or try! so sorry for my quick answer

Posted: Tue 22. Mar 2005, 08:04
by deanloh
LOL, for a moment I thought there was hope.

Thanks for replying anyway, Pappnase, you are a good man.

Posted: Mon 28. Mar 2005, 06:07
by deanloh
I'm still hoping for an answer to this, anyone has a clue?

Posted: Fri 8. Apr 2005, 14:25
by spirelli
did a little search for you, but I am not sure whether this will help in any way:

http://ionrock.umemusic.com/index.php?id=6,11,0,0,1,0
This is trying something a bit different, but maybe you get the right clues from there, or someone else knows some better source...

Posted: Fri 8. Apr 2005, 15:52
by brans
I think the best source to go to will be http://www.modrewrite.de/foren/forums.html , as they are experts in mod_rewrite!

they helped me a couple of times in the past... support is quick and good.