10000 forum users celebration - special event

Alrighty, who is ready for the “@Greenreader9 cannot figure this thing out” game?!?!?!

Today, .htaccess is taking the stand!

Greenreader9 is trying to change domain.tld/prettyurls?id=123 into domain.tld/prettyurls/id/123. Hence this game, he is failing.

.htaccess file in question
php_flag display_errors on

php_value display_errors On
php_value mbstring.http_input auto

#Not allow directory pages
IndexIgnore * 
Options -Indexes

Options +MultiViews +FollowSymLinks

RewriteEngine On

RewriteBase /

#Remove PHP extension (Works)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]

#Remove HTML extension (Works)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L,NC]

 
#Rule I am having issues with is below
RewriteRule ^prettyurls/(.*)$ ./prettyurls?id=$1
prettyurls.php contents
<? print_r($_GET); ?>

Attempt #1: RewriteRule ^id/(.*)$ ./prettyurls?id=$1
Attempt #2: RewriteRule ^prettyurls/(.*)$ ./prettyurls?id=$1


If domain.tls/prettyurls?id=123 is entered, Array ( [id] => 123 ) is returned on both attempts.

If domain.tldl/prettyurls/id/123 is entered, Array ( ) is retuned on both attempts.

Ref1 Ref2

Who will solve it first?

Path and Query are actually correct, the domain is not. The port is HTTPS://, and there is no frangent

1 Like

I have used SteamPixel simple-php-router where you just pass all requests to index.php.

It’s in GitHub, just search for it. It’s also pretty well documented.

5 Likes

6 Likes

Yep, but over the span of the last 4 months or so my earnings have lowered to around $0.01 a day max.
This time last year I can remember earning around $2 a day which was quite a lot for a website!

2 Likes

That was impressive!!!
I used to get $5 per week.
Now I can only get $0.10 per day

4 Likes

About how many visitors do you have?

1 Like

Did not really keep track

1 Like

What? No analytical software?

1 Like

Yes

1 Like

So would I do something like this?

Route::add('prettyurls?id', prettyurls, get)

I don’t see any examples for redirecting in the project…

1 Like

I came across an article that made me think mostly about SEO bots

In short, others analyze your website
and “steal” important content and keywords that they then include in their web pages
so in the end more people visit their pages and less yours.

so I blocked those bots on Cloudflare as well

That could also be the reason why you used to earn more, but today you earn less.

It’s always that war to be in the TOP 5 results from Google
as well as cover as many terms as possible that people might ask through search.

In addition, Google has changed its algorithms several times in the last 2 years and many pages that were once at the TOP have disappeared,
the results are also different depending on the GEO location.

6 Likes

Something like

Route::add('/prettyurls/([0-9]+)', function($id) {
    $number = (int) $id;
    //rest of the code…
}, 'get');
2 Likes

Don’t mind me, I am just the stupid one over here that is still completely lost.

Would something like this work? It does not seem to…

Route::add('/prettyurls/([0-9]+)', function($id) {
    $number = (int) $id;
    header('Location:/prettyurls/id/'.$number);
}, 'get');

Yes? But i don’t get the point since you can just handle it directly in the /prettyurls/ function.
But if you want to do that, you have to set up another route:

Route::add('/prettyurls/id/([0-9]+)', function($id) {
    $number = (int) $id;
    //rest of the code…
}, 'get');

And don’t forget to do Route::run('/')!

1 Like

How did this get added to other Discourse forums.
“Don’t post no-content replies.”

It is a setting in the admin panel. There are lots of other configureable options as well. (In my personal open-source opinion, Discourse is the best forum software, and then afterward for if you don’t have the server reqs. it is Flarum).

4 Likes

New artist that I found out a little while back but I forgot to tell you about her as I always do, anyone?

Btw, haven’t given you enough Bossfight lately:


I can see why Jericho fell if they played this:

Oh and finally, for chilling (and chills):

You’re welcome (in advance) :slight_smile:

3 Likes

I didn’t even know this existed, and a few days ago there was a world championship in the UK

mostly w t f :joy:

6 Likes

7 Likes

*cough *cough

I did not think such a reminder is really necessary, but…

This is the InfinityFree Forum, not the “Let’s promote some competitors” forum.
This is the InfinityFree Forum, not the “Let’s name a new MOFH Host that is going to compete” forum.
This is the InfinityFree Forum, not the “I think I can do a better job than InfinityFree” forum.
This is the InfinityFree Forum, and this post looks a lot better on desktop.

4 Likes