Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache mod_rewrite redirecting all URLs

 
Ramin Esfandiari
Greenhorn
Posts: 16
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to redirect all requested pages to one page.

I have the following

# If no context in URL, redirect to pageC
RewriteRule ^/$ /myserver/pageA/pageB/pageC [R]

This
 
Ramin Esfandiari
Greenhorn
Posts: 16
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I posted the top one incomplete by mistake.

Below lines enable me to simply enter "myserver" and be redirected to the page I want

# If no context in URL, redirect to pageC
RewriteRule ^/$ /myserver/pageA/pageB/pageC [R]

However I need to enter /myserver/pageA/pageB/ and be redirected to /myserver/pageA/pageB/pageC.

Any advice?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic