Mod_rewrite change character or title in url
-
Hi All
Am trying to change a character in a url using mod_rewrite, but with any results.
Am trying to mod_rewrite a URL, but unfortunately without any luck.
https://mywebsite.com/gallery/mycustom-gallery/linkid417
Should be changed to:
https://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
- The topic ‘Mod_rewrite change character or title in url’ is closed to new replies.