1

I am creating an API type plugin, which fetches activity stream from easysocial. But I got SEF URL in the activity stream, I want the NON-SEF URL in case SEF is on in Joomla configuration.

Please tell me how can I do this, programmatically.

I tried to override the Joomla config setting in my plugins, but it won't work as given below.

$config = JFactory::getConfig();
$sef = $config->set('sef', 0);
Søren Beck Jensen
  • 1,676
  • 1
  • 12
  • 22
Vishal2210
  • 491
  • 4
  • 4

1 Answers1

0

You would need to make a special .htaccess rule for that

Find this section:

RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]

And add this line above it:

RewriteCond %{REQUEST_URI} !^/index\.php?option=com_something&var=something

Where you change the URL to be the nonSEF url you do not want parsed.

I have not verified this. Let me know if it does not work.

Søren Beck Jensen
  • 1,676
  • 1
  • 12
  • 22