LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [solved] Help with .htaccess

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2012, 09:15 PM
morrisqueto morrisqueto is offline
New Member
 
Join Date: Mar 2011
Posts: 7
Default [solved] Help with .htaccess

I wanto to redirec all pages that starts with _ on /tag

For example
http://www.domain.com/tag/_rima.html

redirect to
http://www.domain.com/tag/rima.html

I tried with this

Code:
RedirectMatch 301 tag/_([a-zA-Z0-9])-([0-9]+).html http://www.domain.com/tag/$1-$2.html
RedirectMatch 301 tag/_([a-zA-Z0-9]).html http://www.domain.com/tag/$1.html
Here is my .htaccess

Code:
<IfModule mod_rewrite.c>
RewriteEngine on
Rewriterule ^busqueda/(.*)$ index.php?special=search&search=$1 [L]
Rewriterule ^index.html$ index.php [L]
Rewriterule ^contacto.html$ index.php?special=contacto [L]
Rewriterule ^sitemap.html$ index.php?special=sitemap [L]
Rewriterule ^mapadelsitio.html$ index.php?special=sitemap [L]
Rewriterule ^error-(.*).html$ index.php?special=error&error=$1 [L]
Rewriterule ^feed.xml$ feed.php [L]
Rewriterule ^sitemap.xml$ sitemap.php [L]
Rewriterule ^crear-(.*)-([0-9]+).html$ index.php?wizard=$1&step=$2 [L]
Rewriterule ^crear-(.*)-en_linea.html$ index.php?wizard=$1 [L]
Rewriterule ^crear-(.*).html$ index.php?wizard=$1 [L]

Rewriterule ^tag/(.*)-([0-9]+).html$ index.php?tag=$1&tagpage=$2 [L]
Rewriterule ^tag/(.*).html$ index.php?tag=$1 [L]

Rewriterule ^(.*)/([0-9]+)-(.*).html$ index.php?page=$2 [L]

Rewriterule ^([0-9]+)-(.*)/$ index.php?category=$1 [L]
Rewriterule ^([0-9]+)-(.*)$ index.php?category=$1 [L]
Rewriterule ^ejemplos-(.*)/$ index.php?category2=$1 [L]
Rewriterule ^ejemplos-(.*)$ index.php?category2=$1 [L]
Rewriterule ^uploads/(.*)$ descargar.php?filename=$1 [L]
</IfModule>
Thanks
__________________
Ejemplo de

Last edited by NiteWave; 04-22-2012 at 07:27 PM..
Reply With Quote
  #2  
Old 04-21-2012, 12:04 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
tested with RedirectMatch, it works itself.

you may miss '*' or '+', look below:
Quote:
RedirectMatch 301 tag/_([a-zA-Z0-9]+)-([0-9]+).html http://www.domain.com/tag/$1-$2.html
RedirectMatch 301 tag/_([a-zA-Z0-9]+).html http://www.domain.com/tag/$1.html
Reply With Quote
  #3  
Old 04-22-2012, 12:27 PM
morrisqueto morrisqueto is offline
New Member
 
Join Date: Mar 2011
Posts: 7
Thanks it works
__________________
Ejemplo de
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:24 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.