Re: Redirection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/19/08, Alberto García Gómez <alberto@xxxxxxxxxxxxxxxxx> wrote:> 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 usemod_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 isneeded to find the file.
HTH,solprovider

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux