The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP/TPL Link Opens up As File Not Page Reply To: PHP/TPL Link Opens up As File Not Page


here is what I have done
AddHandler application/x-httpd-php52 .tpl
RewriteEngine On
RewriteRule ^contact.php$ /mail/contact.php

If I wanted to add another link just add
RewriteRule ^about.php$ /info/about.php

Assuming that’s the correct path, then yes.

If you’re going to have multiple rewrite rules where only one will (or should) apply, you should add the [L] flag (meaning “Last rule”) to the rule so Apache doesn’t bother to continue parsing unnecessarily:

RewriteRule stop/rewriting /if/this/rule/matches [L]

Would I need to put RewriteCond or base?

RewriteCond: is your rule conditional? If so, yes. If not, no.

RewriteBase: do you need to add a common base path to your rewrites? If so, yes. If not, no.

when have click send button and refresh it show up the old link on mail/contact.php

Meaning it doesn’t redirect?

Did you follow this part?

Write “contact.php” in your URLs