Davie33 Posted September 8, 2012 Share Posted September 8, 2012 Hi i have a url problem if anyone can help on this please. This part helps the url so no need to worrie about this part. $forumcat = intval($_GET['id']); As you can see the 2nd url works great $ctlink = $setting['siteurl'] . 'index.php?act=createtopic&cat='.$forumcat;. But how do i set it for the first url as am working with seo yes and no and what would the htaccess rule be. I have this for htaccess rule for now RewriteRule createtopic.html$ index.php?act=createtopic seo yes is this $ctlink = $setting['siteurl'].'createtopic.html'; doesn't work seo no is this $ctlink = $setting['siteurl'] . 'index.php?act=createtopic&cat='.$forumcat; which works <?php if ($setting['seo'] == 'yes') { $ctlink = $setting['siteurl'].'createtopic.html'; } else { $ctlink = $setting['siteurl'] . 'index.php?act=createtopic&cat='.$forumcat; } ?> <a href="<?php echo $ctlink;?>" class="button">New Topic</a> Link to comment https://forums.phpfreaks.com/topic/268142-php-and-htaccess-problem/ Share on other sites More sharing options...
Davie33 Posted September 8, 2012 Author Share Posted September 8, 2012 This is what the url would look like when seo no http://localhost/mysite/index.php?act=createtopic&cat=4 How do i get it for seo yes ?. $ctlink = $setting['siteurl'].'createtopic/'.$forumcat.'.html'; this is the url link am trying to fix. http://localhost/mysite/createtopic/2.html Link to comment https://forums.phpfreaks.com/topic/268142-php-and-htaccess-problem/#findComment-1376229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.