Jump to content

help needed with RewriteRule


jacko310592

Recommended Posts

hey guys,

the rule below currently rewrites a URL such as:

"mydomain.com/profile/pictures.php?profile=BLAH&imageid=999&page=11"

to: "mydomain.com/BLAH/pictures/999/11/"

 

RewriteRule ^([^/]+)/pictures/([^/]+)/([^/]+)/?$ profile/pictures.php?profile=$1&imageid=$2&page=$3 [NC,QSA,L]

 

..but i need this rule to also work even if the "imageid" and "page" variables are not set; so i can use URLs such as:

"mydomain.com/BLAH/pictures/999/"

and "mydomain.com/BLAH/pictures/"

 

can anyone please suggest how my RewriteRule needs to be changed for it to recognise the above URLs?- at the moment Chrome is giving me "Oops! This link appears to be broken" messages with the above two URLs.

 

hope ive explained myself well, thanks for any help

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.