Follow us on Twitter
Collapse
Welcome, Guest
Please Login or Register.    Lost Password?
JoomAce Support
AceSEF
General Support
Solved Issues
Forum is locked
AceSEF and 200 redirects Forum is locked
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: AceSEF and 200 redirects
#6737
AceSEF and 200 redirects 7 Months, 1 Week ago  
Hello,

A client of mine that is using AceSEF has some 200 redirects setup in .htaccess so certain parts of their Joomla site looks like a different subdomain. For example their blogging component looks like it is coming from blog.foo.com. This was working before switching to AceSEF but it is no longer working. If I shut off AceSEF it works again, however, we lose the rest of the site being setup through AceSEF. I would prefer not to use 301 redirects since that starts to leak the querystring into the main homepage which is just not needed.

Is there a fix for AceSEF to handle 200 redirects correctly?

I am assuming a fix could be done by modifying the parse function in mainrouter.php but am unsure if that is the correct place. If it is not the correct place if you guys could tell me where it would be and I will just write my own patch.

Thanks,
Mike
Michael de Libero
No photo available
VIP Customer

Posts: 8 - Forums Func View Catid 70 Id 12452

Support Forums includes Forums Section View Category 70 Id 12452

graphgraph
Click here to see the profile of this user
The topic has been locked.
 
#12452
AceSEF and 200 redirects 7 Months, 1 Week ago  
Hello,

A client of mine that is using AceSEF has some 200 redirects setup in .htaccess so certain parts of their Joomla site looks like a different subdomain. For example their blogging component looks like it is coming from blog.foo.com. This was working before switching to AceSEF but it is no longer working. If I shut off AceSEF it works again, however, we lose the rest of the site being setup through AceSEF. I would prefer not to use 301 redirects since that starts to leak the querystring into the main homepage which is just not needed.

Is there a fix for AceSEF to handle 200 redirects correctly?

I am assuming a fix could be done by modifying the parse function in mainrouter.php but am unsure if that is the correct place. If it is not the correct place if you guys could tell me where it would be and I will just write my own patch.

Thanks,
Mike
Michael de Libero
No photo available
VIP Customer
Posts: 8
graphgraph
Click here to see the profile of this user
The topic has been locked.
 
#12454
AceSEF and 200 redirects 7 Months, 1 Week ago  
Yes, the parse function of mainrouter.php is the right place, just like we redirect the index.php to homepage, find this:

// Redirect index.php to homepage
Denis Dulici
Forum avatar
Administrator
Administrator rank
Posts: 2683
graph
Click here to see the profile of this user
Gender: Male
If you use AceSEF, please support us by posting a rating and a review at the Joomla! Extensions Directory
The topic has been locked.
 
#12516
AceSEF and 200 redirects 7 Months, 1 Week ago  
Glad to know I was looking in the right place Smile.

In case anyone else needs to do this, this is what I did. Right above the comment "http:// Redirect index.php to homepage" I added this condition:

Code:


if(isset($_SERVER['REDIRECT_QUERY_STRING'])) {
$urlQuery = $_SERVER['REDIRECT_QUERY_STRING'];
if(!empty($urlQuery)) {
$existingQuery = $uri->getQuery();
$newQuery = $urlQuery.((!empty($existingQuery)) ? "&".$existingQuery : "");
$uri->setQuery($newQuery);
}
}



It could be cleaned up.. a lot and I am sure there are bugs in this but it got the job done for me at this point.

-Mike
Michael de Libero
No photo available
VIP Customer
Posts: 8
graphgraph
Click here to see the profile of this user
The topic has been locked.
 
Go to topPage: 1
JoomAce Support
AceSEF
General Support
Solved Issues
Forum is locked
Powered by Kunenaget the latest posts directly to your desktop