Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

For some reason my host not let me have more than one htaccess so I have to make all the changes from the htaccess located in the root.

My directory tree is as follows:

..../
....index.html
....css
....img
....amixermusic
........css
........img
........js
........index.php
........escuchar.php

This is the code for my htaccess:

RewriteEngine On +FollowSymlinks
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^([0-9]+)/$ /$1? [R=301,L]
RewriteCond %{HTTP_HOST} ^traductoramixer.es
RewriteRule (.*) http://www.traductoramixer.es/$1 [R=301,L]

RewriteRule ^amixermusic/escuchar/(.+) /amixermusic/escuchar.php?id=$1
RewriteRule ^amixermusic/buscar/([^/]*)/?(.*) /amixermusic/index.php?q=$1&p=$2

RewriteCond %{QUERY_STRING} fb_action_ids=.*$
RewriteRule .* %{REQUEST_URI}? [R=301,L]

RewriteCond %{QUERY_STRING} fb_comment_id=.*$
RewriteRule .* %{REQUEST_URI}? [R=301,L]

Everything works fine except the lines are to remove fb_action_ids. I do not know what I should change.

Hope you can help me.

I forgot to mention that the like button is in "escuchar.php". This is generated automatically getting the URL of the window using PHP. So I think the statement should specify the directory, no?

share|improve this question
    
Can you clarify what you're wanting to do, and what's not working? –  dan Feb 6 '14 at 1:00

1 Answer 1

I suspect that your rule isn't firing because it is at the end of your file. It comes after some of your other rules that are marked as "Last" rules with the [L] flag. Just moving the rule up to the top of the file should help.

You could also combine it into a single rule by making the condition into this:

RewriteCond %{QUERY_STRING} fb_(action|comment)_id
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.