Jump to content

CBG

Members
  • Posts

    33
  • Joined

  • Last visited

About CBG

  • Birthday 02/04/1976

Profile Information

  • Gender
    Male
  • Location
    UK
  • Age
    45

CBG's Achievements

Member

Member (2/5)

0

Reputation

  1. Just to let you know: The last update osDate had was about 1 and half years ago to osDate 2.6 (http://forum.tufat.com/showthread.php?t=67329) Me and a few others are testing the new version of osDate (osDatePDO), but I don't know of a release date.
  2. Ok how does this look, it seems to work, just a bit worried about the NC on the last RewriteRule. As I have been told NC can create opportunities for duplicate content RewriteCond %{THE_REQUEST} ^[a-zA-Z0-9_-]+\ /profile\.php\?username=([^&]+)\ HTTP/ RewriteRule ^profile\.php$ http://www.mydomain.co/%1? [R=301,L] RewriteRule ^([a-z0-9_]+)/?$ profile.php?username=$1 [NC,L] The idea is http://www.mydomain.co/ABC is normal URL, but if anyone tries https://www.mydomain.co/ABC they redirected back to http
  3. Hi, I have the below rewrite rule RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?username=$1 When I go to: http://www.mydomain.co/ABC It works fine When I go to: https://www.mydomain.co/ABC It redirects to: http://www.mydomain.co/ABC?username=ABC I am not wanting ?username=ABC when being redirected for HTTPS I am wanting to make access to this via HTTP only. I have tried to add ? in places to strip but that didn't work and broke it Any help please
  4. Hi, Have got it now, it was all in a ? (question mark) RewriteCond %{QUERY_STRING} page=allnews RewriteRule ^index.php$ news.php? [R=301,L]
  5. Hi, I have the below rule to try and convert index.php?page=allnews&etc.. to news.php RewriteCond %{QUERY_STRING} page=allnews RewriteRule ^index.php$ news.php [R=301,L] The problem I am having is the URL changes to: news.php?page=allnews I am wanting to strip everything after news.php in the rule Can anyone help? Thanks
  6. Just thought I would come back with a follow up on this. It working fine. I didn't put SET in it, as I thought that was for update. But anyway it works great. Thank you very much
  7. Thanks for the reply I will give that code ago and if it doesn't work do a google on subqueries and/or derived tables. Thanks again
  8. Hi, I would like to do the following in PHP using a MySQL database, but not sure how. select a, b,c etc.. from mailbox where id = X then insert id,a,b,c etc.. into problem When I select, I will be calling the id So I would like it to get data from mailbox and then insert it into problem. How would I go about doing this? Thanks for any help you can give me
  9. Thanks for the reply. This is working to well $str = '0x.xx'; echo ltrim($str,'0'); Let say it is 00.00 I am wanting to remove the first 0 Then again it could be 01.00 I want to remove the first 0 Or it could be 10.00 which mean there is no 0 to remove The numbers could be anything.
  10. I have the first problem fixed. With it removing ,0 or ,1 by using $str2 = $newstring; $pattern2 = "{\,1||,0+}"; $newstring2 = preg_replace($pattern2,"",$str2); echo '<br>'; echo $newstring2; Now it just leaves removing the first 0 if it exists
  11. First problem fixed. My second problem is if the result is 0X.XX,0 or 0X.XX,1 I would like to remove the first 0 The X.XX are numbers, but the 0 is not always there. Can anyone help please Thanks
  12. Just going thought some old cold I had and I think I have found what I want. It seems to be working, but could someone check it over? $pages = array('/index.php','/',); if (in_array($_SERVER['SCRIPT_NAME'], $pages) && $_SESSION['UserId'] <= 0) { $t->display( 'homepage_NEW.tpl' ); } else { $t->display( 'index.tpl' ); }
  13. Hi, What I am after is If on index.php or http://www.domain.com and not logged on (got the bit of code for not logged on) Show not logged on template if logged in show logged in template This only a apply to the index.php page, all other pages have separate .php files So I am only wanting it so I know what template to show for the index.php page
  14. Hi, I would like to do the following but not sure how. If the you/user is on index.php of http://www.domain.com/ show one page If not show another How would I do this? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.