Forum Moderators: phranque

Message Too Old, No Replies

folders to variables

how to

         

yotam

8:33 am on Jun 6, 2006 (gmt 0)

10+ Year Member



Hi,

I have a problem redirecting folders to variables, I have read the post of jdMorgan about converting dynamic to static, but I have a problem, such as :

[videos.domain.com...] redirects to
[domain.com...]

and

[videos.domain.com...] redirects to
[domain.com...]

and I don't no why I have so much trouble.

I wrote this :

RewriteCond %{HTTP_HOST} ^videos\.domain\.com [NC]
RewriteRule ^([^/]+)?$ index.php?page=videos&task=Show_Videos [L]

RewriteRule ^show_videos/([^/]+)?$ index.php?page=videos&task=show_videos&current=$2 [L]

But it doesn't work!

Why?

yotam

8:35 am on Jun 6, 2006 (gmt 0)

10+ Year Member



it's

RewriteRule ^show_videos/([^/]+)?$ index.php?page=videos&task=show_videos&current=$1 [L]

not

RewriteRule ^show_videos/([^/]+)?$ index.php?page=videos&task=show_videos&current=$2 [L]

yotam

11:52 am on Jun 7, 2006 (gmt 0)

10+ Year Member



Anybody?
Please, need your help :-(

jdMorgan

1:38 pm on Jun 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, it appeared from your last post that you had found and fixed the problem.

Specifically, what is wrong when you test your new rules? What do you expect to happen, and what actually happens? What do you see in your server access log and server error log?

Jim

yotam

4:31 pm on Jun 7, 2006 (gmt 0)

10+ Year Member



Hi jdMorgan,

10x for helping.

Well ,there are no error's it's just I don't know what to do!

I want to pass variables by directories, but some times I have just one variable, and sometimes I have more than 1.

So I wrote the code seen above, and It doesn't work.

I mean :
[video.domain.com...]
to resirect to :
[domain.com...]

[video.domain.com...]
to resirect to :
[domain.com...]

[video.domain.com...]
to resirect to :
[domain.com...]

and I don't know why it doesn't work.