Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite again

strange things happen

         

muszek

4:53 am on Nov 15, 2004 (gmt 0)

10+ Year Member



ok, I made a tool and wanted to have short urls for it.
let's say it's dynamic url is
example.com/hattrick_keeper_tool.php?page=some_digits (where some_digits is a number, currently 1,2,3 and 4 are used). I wanted it to be hattrick_keeper_tool-some_digits.php

I don't know regular expressions neither I had strength to learn it today (didn't sleep much lately), so I just looked at other examples and messed a bit.

3 minutes passed and that thing worked fine:
RewriteRule ^hattrick_keeper_tool-([^\.]+).php$ hattrick_keeper_tool.php?page=$1 [L]
hattrick_keeper_tool-4.php pointed to correct file and 4 was the value of the $page variable.

But it was over 6 hours ago and AdSense bots didn't come yet (I get 30000 pageviews per day, usually they come fast). So I didn't know what's going on.

Can anybody tell me what is going on?
And if you could write me something correct instead of ([^\.]+), I'd be thankful :).

jdMorgan

6:39 am on Nov 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The bots will visit on their schedule; Nothing you can do will affect when they visit.

You will need to modify your php pages to output the new search-engine-friendly URLs.

> And if you could write me something correct instead of ([^\.]+), I'd be thankful happy!.

([^\.]+]) or ([^.]+) should work. These patterns simply say, "match one or more characters not equal to a period." If you want to restrict the match to numbers only, you could use ([0-9]+)

Jim