Jump to content



Photo

My News system


  • Please log in to reply
31 replies to this topic

#16 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 06 March 2013 - 13:37

Awesome :)


#17 Sandor

Sandor

    Neowinian Senior

  • Joined: 28-November 03
  • Location: Canada
  • OS: Win 8.1
  • Phone: WP8

Posted 07 March 2013 - 01:51

i am escaping the string and should now not work like that

this should work now

http://www.haggistec...ents&id=muhahah


escaping...assuming you're using mysqli_real_escape_string then?
Not necessarily secure from what I've read.

Thoughts on:
$id = preg_match("/^[0-9]+$/", $_GET['id']);

Doing anything on the page= btw?

#18 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 07 March 2013 - 08:47

yeah looking at the page= thing but not got a lot of time right now

so getting rid of the small problems first :)

#19 Sandor

Sandor

    Neowinian Senior

  • Joined: 28-November 03
  • Location: Canada
  • OS: Win 8.1
  • Phone: WP8

Posted 07 March 2013 - 19:24

is the page used in the query? if not, no need to worry. only need to worry about things directly used in the query really.

#20 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 08 March 2013 - 09:48

nah page is not used in the query only the id

I thought you meant the SEO stuff lol

#21 Sandor

Sandor

    Neowinian Senior

  • Joined: 28-November 03
  • Location: Canada
  • OS: Win 8.1
  • Phone: WP8

Posted 08 March 2013 - 14:24

These days it's a bit of a myth about the address affecting SEO. Always a good idea to include the title though simply because people search for words.

/news/index.php?page=comments&id=54 isn't brilliant.
/news/index.php?page=comments&title=facebook-hosting-windows-8-hackathon is better (and Google can understand query strings)

My own personal blog that I'm creating uses entry.php?entry=title-of-post&category=category-of-post

#22 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 08 March 2013 - 14:28

hmmm never thought about that :) i will have a look

#23 goodbytes

goodbytes

    Just below average Joe

  • Tech Issues Solved: 1
  • Joined: 07-May 04
  • Location: England

Posted 08 March 2013 - 14:33

http://www.generateit.net/mod-rewrite/

use it, and get rid of unnecessary-page-name.php?=

#24 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 08 March 2013 - 21:20

little interim fix

http://www.haggistec...ows-8-hackathon

#25 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 10 March 2013 - 17:11

ok got the mod_rewrite stuff working

does this look better now?

http://haggistech.co.uk/news/

#26 guitmz

guitmz

    Neowinian

  • Joined: 10-June 11
  • Location: Brazil
  • OS: Windows 8, Arch Linux, OSX 10.9
  • Phone: Nexus 4

Posted 10 March 2013 - 17:29

haha nice work mate!!

#27 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 11 March 2013 - 10:35

Thanks lol

#28 togermano

togermano

    hot top for the bottoms

  • Joined: 29-December 02
  • Location: MA,USA
  • OS: win98se(For real)

Posted 11 March 2013 - 19:39

tis sexy

#29 Sandor

Sandor

    Neowinian Senior

  • Joined: 28-November 03
  • Location: Canada
  • OS: Win 8.1
  • Phone: WP8

Posted 11 March 2013 - 20:30

Still trying to grapple with mod_rewrite on my server. Doesn't seem to apply the rules for some reason and then breaks the queries.

What you using in your htaccess?

#30 OP Haggis

Haggis

    Neowinian Senior

  • Tech Issues Solved: 10
  • Joined: 13-June 07
  • Location: Near Stirling, Scotland
  • OS: Debian 7
  • Phone: Samsung Galaxy S3 LTE (i9305)

Posted 11 March 2013 - 20:41


#begin

RewriteEngine on

RewriteRule (.*)/(.*)/ index.php?page=$1&title=$2