xiaoyunwu
asked on
permanent redirect 301
All our URLs has been shortened:
FROM: http://www.test.com/abc/yy/xxx.do
TO: http://www.test.com/xxx.do
and all the xxx.do page is processed by JBoss.
In mod_jk.conf there's one line
JkMount /*.do node
My question is: how do I make all the 301 permanent redirect if user has bookmarked
http://www.test.com/abc/yy/xxx.do to http://www.test.com/xxx.do?
Is it in apache mod rewrite, if so, how to do it?
FROM: http://www.test.com/abc/yy/xxx.do
TO: http://www.test.com/xxx.do
and all the xxx.do page is processed by JBoss.
In mod_jk.conf there's one line
JkMount /*.do node
My question is: how do I make all the 301 permanent redirect if user has bookmarked
http://www.test.com/abc/yy/xxx.do to http://www.test.com/xxx.do?
Is it in apache mod rewrite, if so, how to do it?
If nothing else you could leave a page at each former address with a meta refresh to the new URL. That's the long way...old school...but it could work.
ASKER
there's too many pages to do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
after I added:
RewriteEngine on
I got the following error:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
httpd (no pid file) not running
RewriteEngine on
I got the following error:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
httpd (no pid file) not running
ASKER
httpd.conf
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine on
RewriteRule ^/tec/af/(.*) /af/$1 [L,R=301]
RewriteRule ^/tec/afc/(.*) /$1 [L,R=301]
LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine on
RewriteRule ^/tec/af/(.*) /af/$1 [L,R=301]
RewriteRule ^/tec/afc/(.*) /$1 [L,R=301]