Convince my website that a directory does not exist

Discuss practical ways rearrange URLs using mod_rewrite.

Convince my website that a directory does not exist

Postby Kian » Sun May 08, 2011 7:33 am

Hello

I have a stupid problem with my rewrite rules. I have to convince my website that a directory does not exist. I use /en/ and /fr/ variabables to change language but it gives me error because mywebsite/en/ folder does not exist.

This is real file structure:

http://example.com/index.php
http://example.com/cat.php
http://example.com/dog.php

This is how i change language:

http://example.com/en/index.php
http://example.com/en/cat.php
http://example.com/en/dog.php
http://example.com/fr/index.php
http://example.com/fr/cat.php
http://example.com/fr/dog.php

I simply have to get the URL with /en/ and /fr/ and after i can show the page. Basically i want to redirect example.com to example/$1/something.php. Thank you.
Kian
 
Posts: 11
Joined: Mon Sep 07, 2009 5:45 am

Re: Convince my website that a directory does not exist

Postby Kian » Sun May 08, 2011 1:13 pm

Nvm :) i fixed my problem easily. Ty anyway
Kian
 
Posts: 11
Joined: Mon Sep 07, 2009 5:45 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 32 guests

cron