htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Redirect using RewriteCond
PostPosted: 01 Jul 2008 17:45 
Offline

Joined: 01 Jul 2008 17:12
Posts: 2
Is it possible to redirect 1 url to another using a RewriteCond ?

I tried using Redirect 301 /page/subpage http://www.mysite.com/new-url

but as im using SCRIPT_FILENAME it made the urls appear as

http://www.mysite.com/page?string=subpage

my .httaccess file is

Code:
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^/]*) pagehandler.php?string=$1 [L]

Redirect 301 /page/subpage http://www.mysite.com/new-url


help very much appreciated


Top
 Profile  
 
 Post subject: Re: Redirect using RewriteCond
PostPosted: 02 Jul 2008 13:08 
Offline

Joined: 01 Jul 2008 17:12
Posts: 2
anyone?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB