× Here you can get community support related to ReDJ.

Redirects not working

More
11 years 1 month ago #1573 by MP
Redirects not working was created by MP
hey I have a number of source URL's that have the # character and _ characters in them. They don't appear to be working? I've tried using the \ character to escape them, still no joy. I have set the redirects to

case INSENSITIVE
turned OFF decode URL

Joomla 2.5.11

The plugin works fine with ANY URL that is alphabetical only. I have a number of rewrite rules in my .htaccess (below)

# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]

Any assistance you can give me would be greatly appreciated, thank you for your time and patience

Marty

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #1574 by admin
Replied by admin on topic Redirects not working
Hi Marty,
the URL with the # should have an anchor, like:

/news#latest

If this is the case, just drop the #latest part, cause anchors stay on client and never come to the server (just adapt your rules for the same URL with no #....).

For the _ is different, is not a special char so I need an example of non working URL...

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #1575 by MP
Replied by MP on topic Redirects not working
Hey Luigi, thanks for the rapid reply. The problem is that there are a number of anchors on the old, single page that now need to be redirected to new, full pages e.g.

page1#help needs to be redirected to help.html
page1#aboutus needs to be redirected to aboutus.html
page1#etc needs to be redirected to etc.html

The anchor is important in the redirect (above are examples only) I have tried add the caret ^ and ? to the beginning and end of the URL and that appears to work with the underscore character but not the hash

Thanks for your time and patience

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #1578 by admin
Replied by admin on topic Redirects not working
Maybe I was not clear,
the #anchor part stays on the web browser, and will never sent to Joomla, so you cannot create a rule based on this. Sorry.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #1580 by MP
Replied by MP on topic Redirects not working
That's a bugger ;=] so, you couldn't write an Apache or .htaccess to do the redirect either?

Thanks for taking the time to help Luigi

All the best

Marty

Please Log in or Create an account to join the conversation.

More
11 years 1 month ago #1582 by admin
Replied by admin on topic Redirects not working
I know but it makes sense, you should try to insert the redirect on the client side, attaching an action to the anchor... something like this:

stackoverflow.com/questions/1305211/javascript-to-redirect-from-anchor-to-a-separate-page

No other ways on the server side...

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.205 seconds