Jump to content

URL Rewriting: remove part of the urls

- - - - -

  • Please log in to reply
No replies to this topic

#1
reservoirdog1985

reservoirdog1985

    Newbie

  • Members
  • Pip
  • 2 posts
Hi all,
I working on a website that is built to work in more languages. All the the urls are written like:
www,mydomain,com/lang/my_page.html

The urls are re-written using:
RewriteRule ^([^/.]+)/([^/.]+).html$ /index.php?language=$1&page=$2

The problem is that the website is currently in one language (italian).
For the moment, I would like to remove the language identifier (it) without changing all the links of the website.

I'd like the page above:
www,mydomain,com/it/my_page.html

to redirect to:
www,mydomain,com/my_page.html

Then i would modify the url re-write in order to be:
RewriteRule ^([^/.]+).html$ /index.php?language=it&page=$1

But how can I redirect to the same page removing the /it/ parameter?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users