I'm trying to make a .htaccess redirect to some webpages as usual. Here's how I got it working:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^Profile/(.+)/?$ index.php?page=profile&username=$1 [NC,L]
RewriteRule ^profile/(.+)/?$ index.php?page=profile&username=$1 [NC,L]
RewriteRule ^Profile/Me index.php?page=profile [NC,L]
RewriteRule ^Profile/me index.php?page=profile [NC,L]
RewriteRule ^profile/Me index.php?page=profile [NC,L]
RewriteRule ^profile/me index.php?page=profile [NC,L]
RewriteRule ^Personagem/(.+)/?$ index.php?page=personagem&personagem=$1 [NC,L]
RewriteRule ^personagem/(.+)/?$ index.php?page=personagem&personagem=$1 [NC,L]
And here is what I need: When I'm on "Personagem" page, I can access all "Albums", on the following URL:
/Personagem/--name of character--/Album
Being, --name of character--
, the parameter of /Personagem
. Is it possible?
You can use:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^profile/(.+)/?$ index.php?page=profile&username=$1 [NC,L]
RewriteRule ^profile/me index.php?page=profile [NC,L]
RewriteRule ^personagem/([^/]+)/?$ index.php?page=personagem&personagem=$1 [NC,L]
RewriteRule ^personagem/([^/]+)/([^/]+)/?$ index.php?page=personagem&personagem=$1&album=$2 [NC,L]
You can add other with:
RewriteRule ^personagem/([^/]+)/([^/]+)/([^/]+)/?$ index.php?page=personagem&personagem=$1&album=$2&other=$3 [NC,L]
No need to add PrOfILE or PROfILe... with NC (no case)