/    Sign up×
Community /Pin to ProfileBookmark

htaccess rewrite with the ? symbol

Hi,

i’m running in a problem with redirecting the following url :

[url]http://www.mysite.com/spip.php?article12345[/url] (that was from a spip website)

to a Joomla url pattern :

http://mysite.com/index.php?option=com_content&view=article&id=$1&catid=8&Itemid=104

Where $1 is the 12345 value

So far, i wrote :

RewriteRule ^spip.php?article(.*) http://mysite.com/index.php?option=com_content&view=article&id=$1&catid=8&Itemid=104 [NC,L]

But it seems to stuck at the ? character, and i have no idea how to complete this..

Thanks for helping!

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@DerokorianJul 17.2011 — IIRC you need to escape the ? in the rule as it has a special meaning.
Copy linkTweet thisAlerts:
@netnuvoauthorJul 17.2011 — I tried to escape it with a its still gives me a 500 page...

nothing get rewritten in the url it stays :

http://www.mysite.com/spip.php?article12345 in the browser address bar.

Can you provide me with a valid rewrite command?
×

Success!

Help @netnuvo 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.2,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...