.htaccess

Using a single web hosting account to host multiple sites

.htaccess

Postby jame_2d@yahoo.com » Tue Aug 22, 2006 4:33 am

if i have that url

www.atkhmer.com/jame1
www.atkhmer.com/jame2
www.atkhmer.com/jame3
www.atkhmer.com/jame4

and redirect to

www.atkhmer.com/a/jame1
www.atkhmer.com/a/jame2
www.atkhmer.com/a/jame3
www.atkhmer.com/a/jame4

but that is alot of folder maybe 10000 folder ,so how can make me easy redirect all that


regards
atkhmer.com webmaster
jame_2d@yahoo.com
 
Posts: 12
Joined: Tue Aug 22, 2006 4:26 am

Postby richardk » Tue Aug 22, 2006 4:48 am

How about this:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_URI} ^(/[^/]+)(/.*)?$
RewriteCond %{DOCUMENT_ROOT}/a%1/ -d
RewriteRule !^a(/.*)?$ /a%{REQUEST_URI} [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 35 guests

cron