Jump to content

Translating URLs on the fly, redirect to one file


blirette

Recommended Posts

Hi!

 

I'm fairly new to all this « mod_rewrite » thing but it seems to be the only way to help me with something.

 

Here's what I have to do :

 

Let's say I have this website « www.website.com ». I'd like any URLs to point to the same file for 3 URLs (languages) entered. Example : www.website.com/nouvelles.php should be displyed as www.website.com/nouvelles.php BUT use the file news.php to display the content of the website.

 

In short :

 

www.website.com/nouvelles.php

www.website.com/destacados.php

www.website.com/news.php

 

...should use the file « news.php » to display the content BUT the URL should stay as entered.

 

Is « mod_rewrite » the answer to this?

 

This would improve the SEO of the website because now I use things like « news.php?lang=es » while it should be (at best) « destacados.php » or « destacados.php?lang=es ».

 

Thanks a lot for your precious time!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.