Hello there, i have view.php returning either ?n=Usersname or either ?pid=19283 pid stands for photo id. Is there a way, if the only parameter sent by the URL is pid, but it will also grab the name somehow? site/Username - this is when it returns ?n=Username but when it returns pid I wish something like site/photos/Username/PID --- Any ideas?
If only one shows up at a time, you can't have both in the URL at the same time unless you know how to edit the script and make them show up and you have to have a unique directory for each if only one is in the URL. If both do show up at the same time, use the last time. Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^photos/([^.]+)$ view.php?pid=$1 [L] RewriteRule ^username/([^.]+)$ view.php?n=$1 [L] RewriteRule ^photos/([^.]+)/([^.]+)$ view.php?n=$1&pid=$2 [L]
RewriteRule ^photos/([^.]+)/([^.]+)$ view.php?n=$1&pid=$2 [L] photos/param$1/param$2 - like this will show up ? photos/Scorpiono/99283/ ?