This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other Java Products and Servers and the fly likes Apache mod_rewrite redirecting all URLs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Apache mod_rewrite redirecting all URLs" Watch "Apache mod_rewrite redirecting all URLs" New topic
Author

Apache mod_rewrite redirecting all URLs

Ramin Esfandiari
Greenhorn

Joined: Mar 15, 2013
Posts: 16

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

Joined: Mar 15, 2013
Posts: 16

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Apache mod_rewrite redirecting all URLs