Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.2k views
in Q2A Core by

Hi,

I have a little problem with the urls sent in notification emails. The email gets sent fine and I can see the url correctly within them, how ever when I click the url I'm taken to the question page only.

I can see within the email;

/2440/to-be-or-not-to-be?show=2458#a2458

but, when I click the url and go to my website I can only see in the address bar;

/2440/to-be-or-not-to-be?show=2458

Could it be redirectly somehow?

Here's my .htaccess

DirectoryIndex index.php
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]
 
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
 
</IfModule>
Q2A version: 1.6.2

1 Answer

+2 votes
by
selected by
 
Best answer

Just a question : are you sure that you have that url inside the email body ?

if, inside your email, you move the mouse over the link above and right-click , and you click on the context menu item "copy link location", and after you paste it somewhere (notepad or browser address bar), do you have the url with the # part ?

I ask it to you since I do not think that the fragments (# part of the url) are sent to the server, since they should be  "commands" for the browser if I'm not wrong.

So the # part of the url should not arrive to Apache's mod-rewrite ....

by
Thanks maxjtechno, if I copy&paste into notepad it shows the correct url. It only gets removed if I click the link within the email, very stange.
by
I received the notification for this post here, clicked the url within the email and had the some problem?? Could it be my email client stripping it out? Windows Mail
by
which browser are you using ? if you enter the url with the #  directly in the address bar and press enter does it works correctly ? (taking you to the correct section of the page)
by
I'm using the latest version of Chrome and yes if I paste the url it works.
by
if you click on this link (with your email client) :
http://www.question2answer.org/qa/22674/one-another-error-in-q2a-version-1-6-dev?show=22813#a22813
do you go to the right section of the page ?
by
yes, strange a?
by
Wow, well done!! just tested using webmail and it works so, got to be problem with Windows Mail, thanks for the help
by
great !!! change email client :-)
by
+1 for nice support of maxj
...