Dynamic Page template
-
Hi,
I’ve a little problem with a page template.I have a simple page template named “mypage.php” used in a page named “hello”. Here is the code:
<?php
get_header();
echo “HI “.$_GET[‘username’];
get_footer();
?>If i go to https://www.mydomain.com/hello?username=Pennywise i get:
“Hi Pennywise!”
The problem reguarding the modrewrite.
I’ve created a rule in my .htaccess like this:
RewriteRule ^hello/([^/]+)$ hellousername=$1
Then if I go to https://www.mydomain.com/hello/pennywise I receive a 404 error instead of the page showed by https://www.mydomain.com/hello?username=Pennywise
Anyone can help me? ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Dynamic Page template’ is closed to new replies.