I am getting started with the mod_rewrite function for my PHP webpage
I was superexcited to have created my first rewrite rule, but when I added to my .htaccess file, I got error 500 for all webpages (not only the one I am trying to redirect).
Here is my file:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^([^/]*)/(([^/]*)/)*$
RewriteCond %{REQUEST_FILENAME}index.php !-f
RewriteCond %{REQUEST_FILENAME}index.html !-f
RewriteCond %{REQUEST_FILENAME}index.htm !-f
RewriteRule ^/([a-zA-Z\-]+)\/([a-zA-Z\-]+)\/([0-9]+)$ ficha_jugador.php?idjugador=$3 [L]
RewriteRule (.*) /index.html [L]
My new line is 8th, the rest came by default in my webserver
I tried something much easier for line 8th just to test
RewriteRule ^writetest\.html http://www.after5pc.net [QSA,L]
But it also ended up in 500 error, so it does not seem a syntax problem
Eventually, what I want to do is to change (slug my URLs)
http://cadistas1910.com/ficha_jugador.php?idjugador=1304
by
http://cadistas1910.com/alvaro-garcia-canto/alvaro-garcia/1304
Any help you guys can provide? Thanks a lot!