1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Mod rewrite needed

Discussion in 'Apache' started by Tommo, Jul 25, 2005.

  1. #1
    I give up:mad:

    I've been trying for 3 weeks to get some pages i have into a spiderable state but I've failed miserably.

    In return for someone sorting this out I am quite happy to put a link on 5 or 6 sites if you want i will add a link to the footer file on the site in question currently around 700 pages and growing.

    Below is a current page

    I'd love this to read

    http://www.trackbikes.co.uk/store/page3.htm or something similar and the same for all 271 pages!..

    http://www.trackbikes.co.uk/store/s...3&search=Motorcycles&searchtype=KeywordSearch
     
    Tommo, Jul 25, 2005 IP
  2. expat

    expat Stranger from a far land

    Messages:
    873
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    expat, Jul 25, 2005 IP
  3. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #3
    domain.com/.htaccess

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^store/page(.*).htm$ store/store.htm?language=en&locale=uk&mode=books&page=$1&search=Motorcycles&searchtype=KeywordSearch [L]

    This is ONLY if the only change in the store URLs is the page number. If search, mode language or locale changes, it'll need to be a longer rewrited URL.
     
    Nintendo, Jul 25, 2005 IP
  4. Tommo

    Tommo Active Member

    Messages:
    330
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #4

    Thanks, I tried that but the url is still showing up as

    http://www.trackbikes.co.uk/store/s...2&search=Motorcycles&searchtype=KeywordSearch

    I know mod rewrite works as I already have 2 scripts using it already,
    one being phpbb

    any ideas what I could have done wrong?

    Does the .htaccess need to be in the root or in the store folder. (I've tried both)
     
    Tommo, Jul 25, 2005 IP
  5. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #5
    Yes, you got it working....

    http://www.trackbikes.co.uk/store/store/page25.htm

    Just has an extra directory. Looks like it's the one at domain.com/store/.htaccess
    that's doing it. So what ever is there, delete and upload up to domain.com/.htacess

    Or delete domain.com/.htaccess and have

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /store/
    RewriteRule ^page(.*).htm$ store.htm?language=en&locale=uk&mode=books&page=$1&search=Motorcycles&searchtype=KeywordSearch [L]

    at domain.com/store/.htaccess
     
    Nintendo, Jul 26, 2005 IP
  6. Tommo

    Tommo Active Member

    Messages:
    330
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #6
    Thanks for all the help nintendo, I think I am almost there, the next question may well be because of a complete lack of understanding on my behalf, so accept my apollogies in advance!

    I can now manually enter a SEO friendly ur, l i.e

    http://www.trackbikes.co.uk/store/page8.htm

    However if I then press the next button instead of getting

    http://www.trackbikes.co.uk/store/ page9.htm that I would expect I get

    http://www.trackbikes.co.uk/store/p...9&search=Motorcycles&searchtype=KeywordSearch


    BTW Pm me any links you want placing
     
    Tommo, Jul 26, 2005 IP
  7. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #7
    In the script some where it has the code that generates the links. That needs to be changed. (I've never used that script, I use MrRats.) Search for something like KeywordSearch until you see something that looks like the link.
     
    Nintendo, Jul 26, 2005 IP
  8. Tommo

    Tommo Active Member

    Messages:
    330
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #8
    I found the piece of code below ...

    Where to next oh wise one!



     
    Tommo, Jul 26, 2005 IP
  9. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #9
    Something like

    echo "<li><a href='store/page".
    'page' .'='.($page-1) .'&'.
    .html"'>".xu('previous results')."</a></li>\n";

    with the page change for all three is all I can guess. You might want to E-Mail the person who created the script.
     
    Nintendo, Jul 26, 2005 IP
  10. Tommo

    Tommo Active Member

    Messages:
    330
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    60
    #10

    I actuallly emailed him before and didn't get very far, I've now decided to call it quits and i've installed another script that was SE friendly out of the box (so to speak!)

    thank you for all your help it was much appreciated.
     
    Tommo, Jul 27, 2005 IP