Hi
I've reorganized my site so I have changed its structure. I've also used the htaccess with the form:
ErrorDocument 400 http://www.yyyyy.com/?ERRORE
ErrorDocument 401 http://www.yyyyy.com/?ERRORE
ErrorDocument 403 http://www.yyyyy.com/?ERRORE
ErrorDocument 404 http://www.yyyyy.com/?ERRORE
ErrorDocument 500 http://www.yyyyy.com/?ERRORE
in order to send the missing request page ton an cmsimple error page (hidden) called ERROR.
My problem is that I've also changed the separator from : to /; thats is, previously the page had a link ( from google) http://www.yyyyy.com/?level1:level2 and now http://www.yyyyy.com/?level/level2.
So I need to redirect users coming from external sites (google) to the right page. But As you could read in this tutorial (http://www.tamingthebeast.net/articles3 ... direct.htm) you must use the RewriteEngine on block.
Does someone has used this trick? could you help me?
thanks in advance
sareide
301 redirect. Could you help me?
Re: 301 redirect. Could you help me?
Hi sareide,
I'm not really experienced regarding mod_rewrite, so the following is probably not the most elegant solution, but it should work (at least I hope so -- I've just made some quick tests) for menu_levels<=3. Just put a .htaccess to the CMSimple root directory:
If you have CMSimple directly in the web (HTTP) root, just remove the 2nd line. Otherwise change "CMSimple_XH_153" to the path to the root directory.
Christoph
I'm not really experienced regarding mod_rewrite, so the following is probably not the most elegant solution, but it should work (at least I hope so -- I've just made some quick tests) for menu_levels<=3. Just put a .htaccess to the CMSimple root directory:
Code: Select all
RewriteEngine on
RewriteBase /CMSimple_XH_153/
RewriteCond %{QUERY_STRING} (.*):(.*):(.*)
RewriteRule .* ?%1/%2/%3 [NE,L,R=301]
RewriteCond %{QUERY_STRING} (.*):(.*)
RewriteRule .* ?%1/%2 [NE,L,R=301]
Christoph
Christoph M. Becker – Plugins for CMSimple_XH