0

I enabled clean urls a little while ago on my website that used the first example, but then I stumbled upon the second one. Is the first just a wild card that allows all characters?

# Difference between this
RewriteEngine On
RewriteRule ^(.*)$ /index.php?/$1 [L]

# And this
RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)$ /index.php/$1 [L]
Abu Khan
  • 11
  • 3
  • Possible duplicate of [Reference: mod\_rewrite, URL rewriting and "pretty links" explained](https://stackoverflow.com/questions/20563772/reference-mod-rewrite-url-rewriting-and-pretty-links-explained) – Abhishek Gurjar Aug 21 '18 at 07:04

1 Answers1

0

Basically these are two different regular expressions.
. is a placeholder for any char.
[a-zA-Z0-9]+ is a placeholder for alphanumeric values
* means zero or more matches. For more explanations you can search for RegEx using your favorite search engine.

NielsNet
  • 818
  • 8
  • 11