Need help in Mod Rewrite

Discussion in 'PHP' started by free1free, Jul 3, 2008.

  1. #1
    free1free, Jul 3, 2008 IP
  2. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think anybody is going to answer your question because it's pretty evident that you're just here to spam your links. :mad:
     
    Bryce, Jul 3, 2008 IP
  3. free1free

    free1free Active Member

    Messages:
    120
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #3
    Hi Brayce, Why do you think so? Really I want the answer?
     
    free1free, Jul 4, 2008 IP
  4. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #4
    Bryce may be right, but I think staff must take notice of this thread and review it as per rules.

    Here is user's rating am replying to
    http://forums.digitalpoint.com/itrader.php?u=93263

    What you privately messaged me about was:
    The problem is the new url you want does not have the category id, what Ican do for you is transate:

    "http://www.skinrxclinic.com/Healing-Center-8/Acne-Scarring/page1"
    While will load page
    "http://www.skinrxclinic.com/cat.php?cat_ID=8&page=1&cat=Healing-Center&sub=Acne-Scarring"

    Put followng .htaccess in root of your domain. Make sure to back existing .htaccess if any

    In which you can later remove '-' signes from categoeies names using php's function str_replace.

    regards
     
    Vooler, Jul 4, 2008 IP
  5. projectWORD

    projectWORD Active Member

    Messages:
    287
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    63
    #5
    There is a web app that finds rewrite rules for you. They may not be completely to your needs but they are good enough

    just search URL re-writing application in google, is near top
     
    projectWORD, Jul 5, 2008 IP
  6. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #6
    Off-topic: why not we write a desktop application perform this task ? anybody interested ?

    regards
     
    Vooler, Jul 5, 2008 IP
  7. free1free

    free1free Active Member

    Messages:
    120
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #7
    Hi Vooler,

    Thanks for your time for me.

    I placed the exact code in .htaccess but didn't find any change in URL of the website.
    Can you please advice me if I need any changes.

    Please provide me the easiest URL rewrite code ...what ever it is ....I don't want the previous expected URL
    How long it takes to reflect in the website after updating .htaccess ?


    I also appreciate the suggestion provided by projectWORD.

    Thanks!
     
    free1free, Jul 5, 2008 IP
  8. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #8
    It takes effect immediately.
     
    Vooler, Jul 5, 2008 IP
  9. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #9
    This code will not change the URLs in your site, it will simply access call the URL http://www.skinrxclinic.com/cat.php?cat_ID=8&page=1&cat=Healing-Center&sub=Acne-Scarring when someone access http://www.skinrxclinic.com/Healing-Center-8/Acne-Scarring/page1.

    To reflect these changes in your site, you must change your site code to incorporate these changes.
     
    mwasif, Jul 6, 2008 IP
  10. free1free

    free1free Active Member

    Messages:
    120
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #10
    Hi mwasif,
    Can you please tell me where can I change the site code? and what I need to place ...please provide me as details as possible.
     
    free1free, Jul 7, 2008 IP
  11. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #11
    Vooler, Jul 7, 2008 IP
  12. free1free

    free1free Active Member

    Messages:
    120
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #12
    free1free, Jul 7, 2008 IP
  13. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #13
    You need to change the code whereever you are creating links.
     
    mwasif, Jul 7, 2008 IP
  14. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #14
    Exactly, as mwasif said. What is the system you are running, is it templates based or all in code.

    Probably the index.php that is responsible for creating urls, if badly coded, otherwise there must be templates where links can be changed.

    regards
     
    Vooler, Jul 7, 2008 IP
  15. free1free

    free1free Active Member

    Messages:
    120
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    73
    #15
    It is all in code like ..... <a href="cat.php?cat_ID=<?php echo $a_ch_row['ID']; ?>&amp;page=1&amp;cat=<?php echo urlencode("Anti-Aging"); ?>&amp;sub=<?php echo urlencode($a_ch_row['name']); ?>"><?php echo htmlentities($a_ch_row['name']); ?></a>
     
    free1free, Jul 7, 2008 IP
  16. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #16
    Backup the scipr first. IMPORTANT: remember to include absolute path such as 'http://www.skinrxclinic.com/' in prefix, becuase SEO'd urls act differently.

    Try this now:
    regards
     
    Vooler, Jul 7, 2008 IP