last day (15 days later) » 

11:31 PM
0
A: Adding dot to rewrite rule

l'L'lTo include a literal . (dot/period) within the match pattern you can add it to the character class: [\s\.'0-9a-zA-Z_-] The dot first must be escaped with \ otherwise it means any character. With that the RewriteRule becomes: RewriteRule ^([\s\.'0-9a-zA-Z_-]+)$ index.php?Champion=$1 [NC,L]

 
Damn this one doesn't work I guess it messes up with other RewriteRules
 
What are you trying to match exactly? It might help determine where the problem might be.
 
champion stands for character I'm to match Dr.%20Mundo
 
You might need to add the % character in there as well: [\s\.%'0-9a-zA-Z_-]+
 
Where do i put the % ? So I can test it out quickly
Doesn't work it messes up with RewriteRule ^([0-9/.]+)$ index.php?Patch_No=$1 [NC,L] that is the number of patch so e.g 3.30 or 4.31 etc.
 
11:31 PM
What does the exact url look like and what is the new one you want to rewrite it to?
 
When someone wants to see a patch it looks like leaguenotes/4.23 or leaguenotes/4.55 if sb wants to see a champion it looks like leaguenotes/Dr.%20Mundo leaguenotes/Renekton and so on everything works fine except the Dr. Mundo which im trying to fix
 
Try changing the pattern to: ^/([^\d][\s\.%'0-9a-zA-Z_-]+)$, The patch pattern should also probably be ^([0-9]+\.[0-9]+)$
 
Unfortunately it doesn't pick up champions at all with this code
 
Try removing the /
 
Nope didn't help
 
11:33 PM
I think the problem might be the [^\d], so change it to [^0-9]
 
still nothing
 
hmmm... should have done it.
The problem with that pattern is that it's too general, so that's why it's messing up the other rules.
 
RewriteRule ^([0-9/.]+)$ index.php?Patch_No=$1 [NC,L]
RewriteRule ^([\s'0-9a-zA-Z_-]+)$ index.php?Champion=$1 [NC,L]
this is the original version
and it works perfect except the space
 
one min
 
we can delete 0-9 i dont really think there are any champions with number in name if that helps
 
11:37 PM
well the idea of the [^0-9] was so that it wouldn't mess up the patch rule
[^0-9] means don't match anything starting with a digit
Do the champions names all have spaces?
 
nope jest a few
RewriteRule ^([^0-9][\s'0-9a-zA-Z_-]+)$ index.php?Champion=$1 [NC,L] this works
but when i've added \.
RewriteRule ^([^0-9][\s\.'0-9a-zA-Z_-]+)$ index.php?Champion=$1 [NC,L] it stopped working
 
interesting... so is it all working now?
 
no i still need that . and %
to capture Dr. Mundo
thats probably the only champion with dot in it's name..
but there are a few with spaces
 
when you say not working with \. - does anything happen?
 
yeah i get error Champion doesn't exist
normally if i go to leaguenotes/
it would redirect me to the newest patch like 3.14 or sth
 
11:44 PM
The error you get, can you see the url it tried to rewrite to
 
wait ill quickly redirect ports
i can give you ip with the website itself
 
sure
 
it would be way easier for you I think
 
yeah
 
11:48 PM
It seems to be redirecting for me
 
yeah because I've changed it
now try again
ive added \.
even if you type into your url champion's name or 3.33 patch it won't work
 
yes, but dr. mundo was working with a space for me
(before you added \.)
 
so now? what was your url link
 
both of those directed me to Index of / ...
 
yeah
thats what i get with Dr. Mundo
and my url changes to Dr.%20Mundo
 
11:54 PM
same
 
and you should get screen like
89.68.17.183/LeagueNotes/Aatrox
e.g.
 
ah ok... which is the index.php?champion= ...
 
yes
 
remove the \ in front of the .
 
goes straight to patch doesn't exists
again
exist8
*
 
11:57 PM
ok...
try putting [^0-9] at the end also
 
so like ^([^0-9][\s.'0-9a-zA-Z_-][^0-9]+)$ index.php?Champion=$1 [NC,L]?
even if so still patch doesn't exist
 
^([^0-9][\s.%'0-9a-zA-Z_-]+[^0-9])$ index.php?Champion=$1 [NC,L]
 

  last day (15 days later) »