I'm kind of stuck at this part and was hoping that I'd get some assistance. I'm building a highscores page in PHP, that's going great, it works. However, I dislike the idea of
index.php?skill=name and therefore wanted a bit of SEO in this.
I have successfully replaced the url with a more friendly version:
And this is where the problem starts, I have added pagination to the highscores and the page is read from the HTTP_GET page variable (
I dislike the idea of
highscores/skill/name&page=2 and was hoping if you guys could assist me to make the url like the following:
Page 1, so accessing the file without declaring the page number:
Page > 1 so now the page variable is needed:
As you can tell the "2" will define page 2 and load the correct data for page 2. However, I'm having much trouble in my .htaccess file to configure it this way.
RewriteRule ^highscores\/skill\/(.*?)(\/(.*?)*)$ highscores/skills.php?skill=$1&page=$2 [L] # Skills page
That is my latest attempt in order to get it to work, unfortunately it does not work, it makes the page look horrible (CSS doesn't work) and it doesn't go to the page specified on the URL.
PART 2 - Thanks to w3d for solving my first issue, however, I now face a second issue, which I was hoping the first issue would fix for me.
My index page in the highscores directory shows the overall scores,
domain.tld/highscores/. However, I don't like the idea of
Could you tell me how to make it like:
2 being the page number of course.
Here's what I've tried:
RewriteRule ^highscores/([^/]+)?$ ./highscores/index.php?page=$1 [L]