Redirects not working
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
11 years 1 month ago #1573
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 1 month ago #1574
by admin
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.
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
11 years 1 month ago #1575
by MP
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
11 years 1 month ago #1578
by admin
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.
Less
More
-
Posts: 3
-
Thank you received: 0
-
-
11 years 1 month ago #1580
by MP
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.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.205 seconds