Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

space in old URL not working in 301 redirect
(1 viewing) (1) Guest
Support forum for customers who have purchased JoomSEF 3 (Joomla 1.5 compatible). Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: space in old URL not working in 301 redirect

space in old URL not working in 301 redirect 12 years, 7 months ago #29007

Hi

Order ID 23447
Joomla Version 1.5.23
JoomSEF 3.9.5
Virtuemart 1.1.7
Virtuemart Extension Version 2.0.34


I'm doing a 301 of all old URLs from a static website (same domain name) to the Joomla. The problem is that the old URLs with spaces not working when redirecting to the new url. But urls that do not have a space work fine, they get redirected to to correct automatically generated SEF URL

Examples

This works fine
SomePageA.html > index.php?option=com_virtuemart&page=shop.browse&category_id=1842&Itemid=1


This returns a 404
Some PageB.html > index.php?option=com_virtuemart&page=shop.browse&category_id=1842&Itemid=1


This works fine
Some_PageC.html > index.php?option=com_virtuemart&page=shop.browse&category_id=1842&Itemid=1


What I've tried:

Replacing spaces with a + like this: Some+PageB.html

Backslashing spaces link this: Some\ PageB.html

Replacing spaces like this: Some%20PageB.html

I'm at a lose as to what to do with these spaces to make them work the say as URLs without a space.

When I switch off Configuration>Advanced setting "Trim spaces around URL" the problem is still happening.

WE have a launch this Friday after working really hard over 2 months to get 6500 products ready which will replace a very old static site. I hope someone has an answer to the problem.


Cheers
Mark
Mark
ID 23447
Joomla Version 1.5.23
JoomSEF 3.9.5
Virtuemart 1.1.7
Virtuemart Extension Version 2.0.34

AND

JoomSEF Version 4.2.9
Virtuemart Cart 2.0.8e
Last Edit: 12 years, 7 months ago by markkenyon.
The topic has been locked.

Re: space in old URL not working 301 SOLVED 12 years, 7 months ago #29015

Found a solution for this:

Using the Edit .htaccess menu in JoomSEF I created two of the 700 redirects that I was having a problem with.

1. Test the url's in a browser

2. Then downloaded and opened the .htaccess file in notpad

3. JoomSEF adds the redirects to the very top of the file above everything including

Example
redirect 301 "/Some PageB.html" /index.php?option=com_virtuemart&page=shop.browse&category_id=8&Itemid=1
 
DirectoryIndex index.php
RewriteEngine On
RewriteBase /


4. Copied the format of the redirect and used a spreadsheet to quickly add the details either side of the urls, which is basically to put

redirect 301 "/ at the beginning

In the middle put

" /

5. Copy the rows from the spreadsheet to the .htaccess file opened in notpad

6. Uploaded .htaccess and checked in JoomSEF control panel, which they should all there.

Example URL redirect

redirect 301 "/Some PageB.html" /index.php?option=com_virtuemart&page=shop.browse&category_id=8&Itemid=1

The reason space weren't working in file name URLs is that JoomSEF 301 Redirect Manager was set to remove them and remove things like + \ ""etc.. so by adding them direct to the .htaccess file and and add quotes round the urls that have spaces in them the correct redirect format was preserved.

Hope this helps anyone else that may come across similar problems.

Mark
Mark
ID 23447
Joomla Version 1.5.23
JoomSEF 3.9.5
Virtuemart 1.1.7
Virtuemart Extension Version 2.0.34

AND

JoomSEF Version 4.2.9
Virtuemart Cart 2.0.8e
Last Edit: 12 years, 7 months ago by markkenyon. Reason: typo
The topic has been locked.

Re: space in old URL not working 301 SOLVED 12 years, 7 months ago #29045

  • dajo
  • OFFLINE
  • Posts: 5069
Hi,
Thank you for your report, we'll fix this problem.
ARTIO Support Team
The topic has been locked.
  • Page:
  • 1
User Login Empty