File exists in parent folder or redirect

Discuss practical ways rearrange URLs using mod_rewrite.

File exists in parent folder or redirect

Postby rudi@wwi.dk » Fri Mar 24, 2006 2:23 am

Hello

I'm bugging with the following task:

on www.somehost.com i have created dirs like /da, /en etc to handle the diffent languages a bit cleaner.

I have the following rules in each dirs .htaccess:

RewriteCond if /da/file exist in / do the following
RewriteRule ([^/]+) /$1?flaf=true&%{QUERY_STRING} [L]

otherwise do this:
RewriteRule ^/da/(.*)?(.*)$ /groupstuff.php?request=$1

My problem is the RewriteCond, I can't seem to find a solution to check for the file in the parent dir... i need to remove /da/ before making the '-f' check.

Someone got an idea?
rudi@wwi.dk
 
Posts: 1
Joined: Fri Mar 24, 2006 2:18 am

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: Google [Bot] and 26 guests

cron