.htaccess - Simple RegeX going wrong -


i'm trying redirect 2 pages.

  1. /blog.php /blog/

and

  1. blog/?p=1 /blog/

i have 1 working now.

rewriterule ^blog\/$ blog.php rewriterule ^blog\/$ blog\/?p=1 [l] 

can't figure out how combine these two.

can ?

you can use:

rewritecond %{query_string} ^p=1$ [nc] rewriterule ^blog/?$ blog/? [nc,r=301,l] rewriterule ^blog\.php$ blog/ [nc,r=301,l] 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -