Skip to main content
edited tags
Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90
Formatting, clarified wording
Source Link
MrWhite
  • 43.1k
  • 4
  • 50
  • 90

I have a number of links with similar structure:

wwwexample.somedomaincom/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to somedomain.com/category/example.com/category/

But I want to match only part ofthe URL-path, like URL part bellowie. /index.php/path/some-path/some-subpath, because the query parameter is irrelevant.

www.somedomain**/index.php/path/some-path/some-subpath**?parameter=1

I have puttedtried the following rule,but:

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd? /category/ [L,R=301]

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd\? /category/ [L,R=301]

I have a number of links with similar structure:

www.somedomain/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to somedomain.com/category/

But I want to match only part of URL, like URL part bellow, because query parameter is irrelevant.

www.somedomain**/index.php/path/some-path/some-subpath**?parameter=1

I have putted following rule,but

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd? /category/ [L,R=301]

I have a number of links with similar structure:

example.com/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to example.com/category/

But I want to match only the URL-path, ie. /index.php/path/some-path/some-subpath, because the query parameter is irrelevant.

I have tried the following rule:

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd\? /category/ [L,R=301]
added 128 characters in body
Source Link
Alan Kis
  • 247
  • 2
  • 4
  • 11

I have a number of links with similar structure:

www.somedomain/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to somedomain.com/category/

But I want to match only part of URL, like URL part bellow, because query parameter is irrelevant.

www.somedomain**/index.php/path/some-path/some-subpath**?parameter=1

I have putted following rule,but

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd? /category/ [L,R=301]

I have a number of links with similar structure:

www.somedomain/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to somedomain.com/category/

But I want to match only part of URL, like URL part bellow, because query parameter is irrelevant.

www.somedomain**/index.php/path/some-path/some-subpath**?parameter=1

I have a number of links with similar structure:

www.somedomain/index.php/path/some-path/some-subpath?parameter=1

Which I want to redirect just to somedomain.com/category/

But I want to match only part of URL, like URL part bellow, because query parameter is irrelevant.

www.somedomain**/index.php/path/some-path/some-subpath**?parameter=1

I have putted following rule,but

RewriteRule ^/index.php/path/some-path/some-subpath?parameter=\dd? /category/ [L,R=301]

Source Link
Alan Kis
  • 247
  • 2
  • 4
  • 11
Loading