Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I make redirection ?
#10
Draxeiro Wrote:...
However, when I try something along the lines of:

Code:
RewriteRule ^index.php?option=com_content&task=view&id=19&Itemid=35$ http://www.liftus.nl/service-onderhoud/ [R=301,L]

it will yield a 'page not found'.

Two problems:
  • RewriteRules only work on the part before the query string
  • Even if they worked with the query string, ? is a special character in a regular expression and must be escaped

You should try something like
Code:
RewriteCond %{QUERY_STRING} Itemid=35$
RewriteRule ^index.php$ http://www.liftus.nl/service-onderhoud/ [R=301,L]
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
How can I make redirection ? - by gimx - 2011-03-16, 11:20:00
RE: How can I make redirection ? - by SoHo22 - 2013-06-19, 21:30:08
RE: How can I make redirection ? - by SoHo22 - 2013-06-24, 03:09:20
RE: How can I make redirection ? - by rhecht - 2013-08-29, 02:17:39
RE: How can I make redirection ? - by rhecht - 2013-08-29, 02:22:06
RE: How can I make redirection ? - by wakh - 2014-03-07, 10:04:37
RE: How can I make redirection ? - by Hypertexter - 2014-06-21, 20:08:32
RE: How can I make redirection ? - by bigthanks - 2015-11-19, 00:09:02
How can I make redirection ? - by yojoe - 2011-03-16, 11:25:57
How can I make redirection ? - by gimx - 2011-03-16, 11:51:57
How can I make redirection ? - by yojoe - 2011-03-16, 20:44:47
How can I make redirection ? - by gimx - 2011-03-16, 22:37:42
How can I make redirection ? - by ccagle8 - 2011-03-16, 22:57:30
How can I make redirection ? - by gimx - 2011-03-16, 23:18:17
How can I make redirection ? - by Texta - 2011-03-17, 00:32:17
How can I make redirection ? - by Draxeiro - 2012-05-10, 20:38:48
How can I make redirection ? - by mvlcek - 2012-05-10, 20:59:01
How can I make redirection ? - by Draxeiro - 2012-05-10, 22:01:21
How can I make redirection ? - by mvlcek - 2012-05-10, 22:29:53
How can I make redirection ? - by Draxeiro - 2012-05-10, 22:58:52



Users browsing this thread: 1 Guest(s)