Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
URL rewrite for old link?
Page:  previous  1  2 
Avatar
mekineer #16
Member since Mar 2018 · 28 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 66390

RewriteEngine on

RewriteBase /

RewriteRule ^dokuwiki/(.*)$ $1 [R=301,L]

RewriteCond %{QUERY_STRING} ^(id=)([^\:]*)\:(.*)$
RewriteRule $(.*)$ %2/%3 [E=underscores:Yes,QSD]

RewriteCond %{ENV:underscores} ^$
RewriteRule ".?" "-" [S=6]

RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6-$7 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5-$6 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4-$5 [QSD]
RewriteRule ^(.*)_(.*)_(.*)_(.*)$  $1-$2-$3-$4 [QSD]
RewriteRule ^(.*)_(.*)_(.*)$  $1-$2-$3 [QSD]
RewriteRule ^(.*)_(.*)$  $1-$2 [QSD]

RewriteCond %{HTTP_HOST} ^mekineer\.nerdondemand\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC,OR]
RewriteCond %{https} off [OR]
RewriteCond %{ENV:underscores} ^Yes$
RewriteRule (.*) https://mekineer\.com/$1 [R=301,L]
This post was edited on 2019-06-04, 11:47 by mekineer.
Avatar
mekineer #17
Member since Mar 2018 · 28 posts
Group memberships: Members
Show profile · Link to this post
I would really like to substitute this, but it just doesn't work:
RewriteCond %{ENV:underscores} ^$
RewriteRule ^([^_]*)_+(.*)$ $1-$2  [QSD,N]
This post was edited on 2019-06-04, 12:01 by mekineer.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  previous  1  2 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-24, 00:47:49 (UTC +02:00)