Java Mailing List Archive

http://www.apache-httpd.com/

Home » users.httpd »

Re: [users@httpd] Redirection

solprovider

2008-07-19

Replies: Find Java Web Hosting

Author LoginPost Reply
On 7/19/08, Alberto García Gómez <alberto@(protected):
> I have this URL
> http://www.server.com/index.php?article1.html
>
> and work like that
> http://www.server.com/?article1.html
>
> But I really really need this
> http://www.server.com/article1.html
>
> And I need to work like previous URL and I need to make the changes in
> .htaccess file
> PLEASE I had try everything and nothing work, somebody can help me please.

Am I missing something? The answer is your title. Just use
mod_rewrite to translate the old URLs to the new URLS or vice versa.

# Required for Rewrite
    Options FollowSymLinks
    RewriteEngine On
# Choose one or create potential infinite loop.
# Translate /article1.html -> /index.html?article1.html
    RewriteRule ^/article1.html$ /index.html?article1.html [P]
# OR
# Translate ?article1.html -> /article1.html
    RewriteCond %{QUERY_STRING} ^article1.html$
    RewriteRule ^*$ /article1.html [P]

You could use [L] instead of [P] if you are certian that no proxy is
needed to find the file.

HTH,
solprovider
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.