Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a problem about two salsh in post id "//"

    hi,
    my article's directory url was without post ID
    i found this code in core.php file

    PHP Code:
    $Article->url $Article->Category->url.$Article->urltitle.'.'.$this->db_settings['url_extension']; 
    and changed it to

    PHP Code:
    $Article->url $Article->Category->url.'/'.$Article->id.'/'.$Article->urltitle.'.'.$this->db_settings['url_extension']; 
    this mean that i added

    PHP Code:
    '/'.$Article->id.'/'
    after

    PHP Code:
    $Article->Category->url
    so, ID displayed but after two slash "//"

    example:
    http://sharemorearticles.info/misc//...vertising.html

    when i delet

    PHP Code:
    '/'
    that before

    PHP Code:
    $Article->id.'/'
    the url not work and give me the missage

    page can't be found

  2. #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    17,027
    Thanks
    4
    Thanked 2,668 Times in 2,637 Posts
    What is the code you currently have?

  3. #3
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i have now the seconed code, please check the example

  4. #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    17,027
    Thanks
    4
    Thanked 2,668 Times in 2,637 Posts
    No. You said you deleted '/' from it. Is that second block including it or after you deleted it?

  5. #5
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no,
    i delet it to test if will work or no, i find it not working and gives me the message "page can not be found", so i have to return it.
    now "/" already exist.
    the problem is how to remove it and keep the link working
    Last edited by yosri algharawy; 02-01-2012 at 10:58 PM.

  6. #6
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    17,027
    Thanks
    4
    Thanked 2,668 Times in 2,637 Posts
    It looks to me like this will work:
    PHP Code:
    $Article->url $Article->Category->url $Article->id '/' $Article->urltitle '.' $this->db_settings['url_extension']; 

  7. #7
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i placed your code but not work
    check now
    http://sharemorearticles.info/misc/2...vertising.html

    but it works with two slashs

    http://sharemorearticles.info/misc//...vertising.html

    i attached you the core file and the code folder Completely dividing to 3 partes
    Attached Files Attached Files

  8. #8
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    17,027
    Thanks
    4
    Thanked 2,668 Times in 2,637 Posts
    Are you sure its not your rewrite causing the problem?
    I really have no intention of going through 1.5MB of your code to find a single /. You'll need to work out whether this issue is a PHP one or a rewrite one. Multiple sequential /'s within a URL (except the scheme) will not cause a failure. I thought your issue was actually creating the url, but right now it sure stinks of your rewrite.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •