/    Sign up×
Community /Pin to ProfileBookmark

Help with wildcars

Hello I would like to know if somebody could help me with wildcards function in apache and .htaccess file. I have the following code in the .htaccess that redirects a subdomain to a folder in the main domain

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !www.domain.com$ [NC]
RewriteCond %{HTTP_HOST} ^([url]www.)?([/url][a-z0-9-]+).domain.com [NC]
RewriteRule (.*) myfolder/param=%2&param2=$1 [L]

The problem is that I like to rewrite more parameters, the code just alows to rewrite (.*) as a param2=$1 and want do something like this

RewriteRule (.*),(.*) myfolder/param=%2&param2=$1&param3=$2 [L]

I tried this but doesn’t work and instead it redirects to the main domain.

I hope you can help me, please is urgent.

Thank you.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@artemisMay 04.2008 — Whats the syntax of the url, is it:

www.domain.com/param1,param2 or

www.domain.com/param1/param2
Copy linkTweet thisAlerts:
@Jose_authorMay 06.2008 — the sintax of the url is

http://www.domain.com/Italian,category,1871,parent_id,categories

and I am trying to get is:

param1=Italian,category,1871,parent_id and

param2 =categories

to get this:

categories.php?rewrite= Italian,category,1871,parent_id
×

Success!

Help @Jose_ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...