Jump to content

charl9cfc

Members
  • Posts

    8
  • Joined

  • Last visited

charl9cfc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All Am trying to change the following url: http://mywebsite.com/gallery/cuisine/?nggpage=2linkid446 to read: http://mywebsite.com/gallery/cuisine/?nggpage=2?photoid=446 Have tried the following rules, but it does not want to change the url: RewriteCond %{REQUEST_URI} ^/gallery/cuisine/?nggpage=2linkid$1[a-z]+([0-9]+)$ RewriteRule ^(.*)$ /gallery/cuisine/\?nggpage=$2?photoid=%1 [R=301,NE,L] Regards, Charl
  2. Solved the issue by using: window.onload = function() { if (querySt("photoid")) { var value = querySt("photoid"); window.location.hash = querySt("photoid"); } if(window.location.hash) { $(window.location.hash).trigger('click'); } }; Regards, Charl
  3. Solved the issue by using: $pattern1 = "/\?param=true+/i"; $pattern2 = "/\?photoid=[0-9]+/i"; $content = preg_replace(array($pattern1, $pattern2), '', $myString); thanks.
  4. There is a specific reason for adding those parameters to the url.
  5. Hi All Require to remove multiple query strings from a specific url: http://mywebsite.com/gallery/custom-gallery/?param=true?photoid=417linkid417 Should read: http://mywebsite.com/gallery/custom-gallery/linkid417 Am able to remove 1 part of the query string using: $myNewString = preg_replace("/\?param=true+/i","",$myString); Have tried using the following, but it then strips out everything: $string = preg_replace('/?.*/','',$myString); Any suggestions please? Kind regards, Charl
  6. Hi all Am trying to combine two JQuery functions, but without any success. if (querySt("photoid")) { var value = querySt("photoid"); alert(value); } with window.onload = function() { if(window.location.hash) { $(window.location.hash).trigger('click'); } }; Have tried the following: if (querySt("photoid")) { var value = querySt("photoid"); window.onload = function() { if(window.location.value) { $('#' + window.location.value).trigger('click'); } } }; Hash requires to be replaced with the actual '#' symbol. photoid returns the image id value like 415. Any suggestion will be much appreciated. Kind regards, Charl
  7. Hi Guys Thank you for all the responses. @theverychap - very useful article. Thanks for sharing that resource. @jazzman1 - That worked 100%. Regards, Charl
  8. Hi All Am trying to mod_rewrite a URL, but unfortunately without any luck. http://mywebsite.com/gallery/mycustom-gallery/linkid417 Should be changed to: http://mywebsite.com/gallery/mycustom-gallery/#417 Where '417' is a dynamic id of an image & mycustom-gallery will also change every-time. I've tried the following rules, but none seems to work... RewriteRule ^/gallery/$1/#([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/y/([0-9]+)$ /gallery/$1/linkid [L,R=301] RewriteRule mycustom-gallery/#.*$ /mycustom-gallery/linkid=417/$1 Regards, Charl
×
×
  • 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.