9

I went through all the trouble of writing up this question after having sunk hours into this problem, when I took one last look and -finally- something I should have remembered clicked in my head. $config['uri_protocol'] = "" That config variable was the trick. If you're having a similar issue, try a couple of common settings for it - AUTO and PATH_INFO ...


8

Thanks for nudge Derek. I was totally unaware that the site was running as a FastCGI process. This is the default with (mt) dv 4.0 & Plesk 11.0.9 when creating new hosts. Which maybe explains other user's issues with removing index.php at MediaTemple I switched it back to Apache and removed the ? from the rewrite rule and the redirects are working ...


8

This generally has to do with PHP being connected to Apache via FastCGI, rather than mod_php. When this is the case, an extra ? is needed in the rewrites to EE's index.php: From RewriteRule ^(.*)$ /index.php/$1 [L,QSA] To RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]


7

Try changing the order of your RewriteRules. i. e. put the addition of the www before the removal of the index.php.


6

Because EE (and CI) run all page requests from a single index.php they must pull in the dynamic data from the URL. In general it does this via the server environment variable PATH_INFO. The problem, though, is that not all servers have this environment variable set. That's why EE and CI allow you to change how the URI is read. In some cases the environment ...


6

If you're only allowing access to a single template, I'd imagine the easiest way would be to use PHP's header to add header('Access-Control-Allow-Origin: *'); At the top of the template


6

actually I don't use NSM htaccess generator , but I can help you with this problem. first thing update to the last version , if you have the last version and still have this problem you can solve it as following: about the first one:do_hash() problem. replace do_hash() function with PHP’s hashing functions like sh1 about the second one generate_json() : ...


6

This is what I usually have in my .htaccess for this (goes right after RewriteBase /): # Remove the trailing slash to paths without an extension RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301]


5

After a lot of research and experimenting, I think I found a solution: # Force non-SSL on these URLs <IfModule mod_rewrite.c> RewriteCond %{HTTPS} on RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1 !^(account|system|admin\.php) [NC] RewriteRule (.*) http://%{HTTP_HOST}%{...


5

We keep all of our downloadable files above web root, so they're not directly accessible, similar to this setup: /public_html /system /files And of course, we use Link Vault to obfuscate, protect against hot linking, and track the downloads.


5

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] Reference Basically if the request is not a folder or not a file, then add index.php and let EE control it, otherwise it'll be served by whatever is in the relevant path. Ensure none of your other htaccess entries conflict with this though and that ...


5

Can you get the templates to render if you leave index.php in your URL? eg localhost:8040/index.php/cursos If so then it is your .htaccess. Max is right about the order of your .htaccess file. Also, you could try adding a '?' in your RewriteRule directly after index.php eg RewriteRule ^(.*)$ /index.php?/$1 [L] A fairly reliable method of removing ...


5

Change the RewriteCond %{REQUEST_URI} !/system/.* [NC] line in htaccess to match the new system folder name: RewriteCond %{REQUEST_URI} !/new_system_folder_name/.* [NC]


5

If you are running from localhost:8888, then locally you are essentially running these sites from subdirectories. So the .htaccess you are using (RewriteRule ^(.*)$ /index.php/$1 [L]) is sending requests to http://localhost:8888/index.php. Try the second exception from the user guide: RewriteRule ^(.*)$ index.php/$1 [L] Notice there is no / in front of ...


4

For your .htacces you can use # remove trailing slash RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L] To improve the urls on your page you can use my little plugin called 'remove_trailing_slash'. It is not yet aproved by devot-ee, but i can send you the plugin right away. The usage is simple: {exp:remove_trailing_slash url="www.google.nl/"} or {exp:...


4

Found the answer from another question. Had to add AllowOverride in httpd-vhosts.conf: <Directory "C:\Site\Root\Path"> AllowOverride All Order Deny,Allow Allow from all </Directory>


4

Try <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Rewriter" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions> <add input="{R:1}" pattern="^(index\\.php|images|css|js|favicon\\.ico)" ...


4

You should be able to do this in htaccess: <IfModule mod_headers.c> SetEnvIf Request_URI "^/index.php/embeddable-content(/.*)?" CORS=TRUE Header set Access-Control-Allow-Origin "*" env=CORS </IfModule> This'll only set the CORS header when your request matches that URI.


4

This isn't really an issue with your htaccess. You need to look at using a simple EE config bootstrap file such as this one to automatically set $config['theme_folder_url'] as either HTTP or HTTPS depending on whether the current request is served over HTTPS. In the most basic form, you could probably just add this to your config.php file: if (empty($...


4

Many default SSL setup have settings to ignore .htaccess at all. So server use your .htaccess for http, but for security reason ignore default rules overwrite for https. Check your ssl config (try - /etc/httpd/conf.d/ssl.conf) what flag you have for AllowOverride? Possible you have None - in this case, the server will not even attempt to read .htaccess ...


3

Take a look at this: http://kevinthompson.info/blog/2011/03/04/completely-remove-index-php-from-expressionengine-urls.html I just recently discovered that solution and it's working great on our ecommerce website running with CartThrob and certain pages with https.


3

Ok- so the issue for me turned out to be "Content Elements" plugin from Krea. After disabling this, the errors went away!


3

The 404 line is almost certainly the problem. I've seen this a couple times before now. Basically Apache is treating every page load as a 404 and sending it through to ExpressionEngine. At this point EE sees the URL and displays the page you expect. While this works well enough for most pages, it also happens to destroy any POST data, which is why no ...


3

One possible culprit - if you have Store installed, and have the Require SSL connection for checkout and order tags setting enabled, it would redirect every time you use Store tags on your site over an unencrypted connection. That might explain why it's only happening on some pages.


3

Try changing $assign_to_config['site_url'] = 'http://www.mydomain.com/nl/'; to $assign_to_config['site_url'] = '//www.mydomain.com/nl/'; we haven't done with Store before, but had to use it in other areas of sites we've done, so that the page will properly load as SSL. The process is called 'protocol-relative'. We were having a slew of SSL issues, ...


3

What you are doing doesn't make any sense. There is no point having a separate /pub directory if everything is still within the webroot. The only reason you would have a separate pub (or public_html) directory is if you want to keep your system folder above the webroot. This adds an extra layer of security, though it only really protects against a ...


3

The two chunks of code you require are: # Redirect certain site pages to SSL and vice-versa RewriteCond %{REQUEST_URI} !(extranet|themes|images|assets) RewriteCond %{QUERY_STRING} !^(ACT=.*)$ [NC] RewriteCond %{HTTPS} on RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L] RewriteCond %{REQUEST_URI} (extranet) RewriteCond %{HTTPS} !=on #...


3

Is https://secure.domainname.com the actual place where EE is installed? You'll need to install it in this 'secure' subdirectory and ensure that all paths within the system are correctly pointing to this location on the server.


3

Take the standard method and add in your subfolder name before index.php in the RewriteRule. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /SUBFOLDER/index.php/$1 [L] </IfModule>


3

Depending on usage, you may want to just use the Pages Module, which lets you configure custom URLs and connect them to the template of your choice. I use this quite a lot in my setups.


Only top voted, non community-wiki answers of a minimum length are eligible