Toggle navigation
Dashboard
Dashboard Tracker
Add / Edit My Forums
System Announcements
Discussion
Active Thread Feed
Top Threads Today
Top Threads This Week
Top Threads Library
Go!
View All
View All
Login
Logout
Home
Forums Index
Server Side
/
Apache Web Server
10:01 pm May 1, 2026
This page requires javascript.
Forum Moderators:
phranque
Message Too Old, No Replies
301 htaccess redirect help
301 htaccess redirect help
awidea
Msg#:4357934
1:04 pm on Sep 2, 2011
(gmt 0)
Hi,
How to create a htaccess redirect for such url
/dossiers_artikel.php?mainID=6&subID=5&contentID=60
to
[
noordzee.nl
...]
I tried
redirect 301 /dossiers_artikel.php?mainID=6&subID=5&contentID=60 [
noordzee.nl
...]
Please help me.
g1smd
Msg#:4357935
1:07 pm on Sep 2, 2011
(gmt 0)
This is a question that is asked here almost every day.
As per forum charter, let's see your code. Use previous answers (there are thousands) for guidance.
Use a RewriteRule (not Redirect) and remember that RewriteRule sees only the path part of the request. Use a RewriteCond to look at QUERY_STRING.
Use example.com in the forum to suppress auto-linking.
awidea
Msg#:4357940
1:09 pm on Sep 2, 2011
(gmt 0)
Hi g1smd,
Thank you very much for the reply. I am very new for this. I have no idea for it. Can you Please write a line how I should do it?
Thank you!
wilderness
Msg#:4357951
1:25 pm on Sep 2, 2011
(gmt 0)
Search for each of the following:
"?" (101,000 results), "QSA" (481 results), and "string" (10,600 results) and you'll find thousands of line examples.
BTW g1smd is in a different time zone and is currently copping some Z's, or at least should be.
awidea
Msg#:4357954
1:29 pm on Sep 2, 2011
(gmt 0)
Anyone to give Proper example Please?
awidea
Msg#:4357967
2:00 pm on Sep 2, 2011
(gmt 0)
I tried it like this
RewriteCond %{QUERY_STRING} ^mainID=6&subID=5&contentID=95$
RewriteRule ^/dossiers_artikel/.php [
noordzee.nl
...] [R=301,L]
still not working....
g1smd
Msg#:4357982
2:07 pm on Sep 2, 2011
(gmt 0)
Omit first / - paths are localised "per directory" before being presented to mod_rewrite.
Change second / to be \ - you need to escape the literal period.
You should also set your rules so that if the parameters are requested in a different order, the redirect should still occur.
Use example.com in the forum to suppress auto-linking.
awidea
Msg#:4357985
2:15 pm on Sep 2, 2011
(gmt 0)
Tried this nothing happen.
RewriteCond %{QUERY_STRING} ^mainID=6&subID=5&contentID=95$
RewriteRule ^\dossiers_artikel/.php [
noordzee.nl
...] [R=301,L]
awidea
Msg#:4357999
3:41 pm on Sep 2, 2011
(gmt 0)
No one can help?
g1smd
Msg#:4358092
8:15 pm on Sep 2, 2011
(gmt 0)
The words "first" and "second" in my earlier post seem to have been misinterpreted.
I don't how much more clear I need to write it.
awidea
Msg#:4358095
8:26 pm on Sep 2, 2011
(gmt 0)
Thanks for your reply. I fixed it with a plugin.
wilderness
Msg#:4358186
1:07 am on Sep 3, 2011
(gmt 0)
I don't how much more clear I need to write it.
g1smd,
A copy and paste solution is much clearer ;)
Join The Conversation
Register
For Free! -
Become a
Pro Member
!
See forum categories
-
Enter the Forum
Moderators and Top Contributors
Moderator List
| Top Contributors:
This Week
,
This Month
,
Apr
,
Mar
,
Archive
,
Top 100 All Time
,
Top Voted Members
Hot Threads This Week
April 2026 Google Search Observations
AdSense Earnings and Observations - April 2026
what do they want?
Hello again, it's been a while
I need some SEO help
SEO question
Do you get tired of others copying your content?
5 SEO Tips That Actually Worked for My Blog in 2026
Home
Forums Index
Server Side
/
Apache Web Server
10:01 pm May 1, 2026