login community faq

Hello, i installed a drupal 7 website and i want to use wordpress and my drupal site together. i created a drupal 7 application and wordpress application, then i linked my drupal 7 app to my root directory "/" and wordpress app to "/blog" paths.

On my drupal 7 website in my main navigation i have a blog link, which is linked to mysite.com/?q=blog url, but i cannot redirect it to mysite.com/blog url, when i directly enter mysite.com/blog url to my browser i can reach my wordpress site, it seems simpe but i cannot redirect ?q=blog url to just "blog " path...

thanks in advance

asked Oct 07 '11 at 04:31

realbezo's gravatar image

realbezo
11

Hi,

Can you provide some more information on how you are doing the redirection? Do you use Rewrite rules in .htaccess? Please paste them here if so.

(Oct 07 '11 at 04:45) todork todork's gravatar image

RewriteRule ^?q=blog$ http://www.myysite.com/blog [R=301,L] i tried this but nothing changes

(Oct 07 '11 at 05:06) realbezo realbezo's gravatar image

and when i try RewriteRule ^?q=blog$ http://mysite.com/blog [R=301,L]

i get

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

(Oct 07 '11 at 05:17) realbezo realbezo's gravatar image

Hi,

You can't match the GET parameter "q" inside the Rewrite rule. You need to use the RewriteCond directive for this. Here are the Rewrite rules you need to use in order to do such a redirection:

RewriteEngine on

RewriteCond %{QUERY_STRING} q=blog

RewriteRule ^.*$ http://www.mysite.com/blog [R=301,L]

If you still have troubles using these rules, please open a support ticket, and we will look at your .htaccess.

answered Oct 07 '11 at 05:31

todork's gravatar image

todork
10964

thank you, it worked, i can open now my wordpress site

by the way the rule redirects me not http://www.mysite.com/blog/ url instead it redirects me to http://www.mysite.com/blog/?q=blog url but it still works, and opens my main wordpress page p.s. i think i have really little knowledge about rewrite rules and htaccess file, thank you for patience and help

(Oct 07 '11 at 06:34) realbezo realbezo's gravatar image

You are most welcome! Yes, unfortunately the GET parameter gets passed to the new URL as well - I'm not aware of a way to bypass this.

(Oct 07 '11 at 06:38) todork todork's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×143
×44

Asked: Oct 07 '11 at 04:31

Seen: 1,631 times

Last updated: Oct 07 '11 at 06:38

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited