Questions tagged [htaccess]

A .htaccess file is a directory-level configuration file used to override a subset of the web server's global configuration.

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

SSL Subdomain Staging Site in Subfolder is Resolving Webroot Instead

I'm trying to set up a staging subdomain in a subfolder under the webroot of the main production site for testing and deploying changes for a EE e-commerce website. I hope one or two of the more ...
0 votes
2 answers
258 views

Problems removing index.php from development site

I'm trying to set up a development site with a specific development URL. The development site is a clone of a live site, but I'm not able to get the htaccess code to work to remove index.php.I've ...
0 votes
1 answer
39 views

.htaccess redirect for new template group name

I had to change a template group name for a blog channel from news-and-blog to news-and-forum. I am trying to create a redirect in .htaccess that would redirect the old URL along with any of the blog ...
0 votes
1 answer
2k views

Too many redirects error (htaccess)

I recently got an SSL for my website and I'm trying to set up a htaccess so whenever someone joins the site it automatically takes them to the secure version of the site, but whenever I upload my ...
0 votes
2 answers
320 views

ExpressionEngine Control Panel SSL HTTPS Issue

I have an issue with the HTTPS header for the ExpressionEngine control panel where the JS is being disabled. It keeps generating error messages where HTTP is being loaded over HTTPS (see below): ...
0 votes
1 answer
433 views

htaccess: remove trailing question mark and value after amp at the end of a url

i'd like to remove question mark and value at the end of a url ending with amp. For example, i want the following url: http://www.domain.com/category/page.html/amp?value=12 to be like this: http://...
0 votes
2 answers
145 views

HTTPS url just redirects back to HTTP

I have a site that's running EE 3.3 and I'm trying to change it to include the SSL certificate that's just been installed on the server. I normally can change the config or the URL settings to ...
0 votes
1 answer
59 views

ExpressionEngine htaccess with password protected subdomain

I have inherited an ExpressionEngine site and need to add a password-protected subdomain. The original htaccess file in the root directory was... <IfModule mod_rewrite.c> RewriteEngine On ...
0 votes
1 answer
103 views

htaccess - Best practice-version for EE5?

My htaccess is very big, because I upgraded, changed, optimized … it from EE1 to EE5. I am not sure what could be trashed. E.g. I have a rule somewhere to remove index.php, probably I don't need this ...
0 votes
1 answer
850 views

URL Redirecting Issues

We are running expression engine v2.7.2 and the issue we seem to be having is that URLs are redirecting to the segment 2. ex. 1 http://www.website.com/pagedoesntexist - displays 404 error ex. 2 ...
0 votes
1 answer
41 views

how to redirect from website.com/index to website.com

For example, visitor types www.website.com/index. I want to remove index and show this url www.website.com In .htaccess wrote RedirectMatch 301 /index https://www.website.com As result instead of ...
1 vote
2 answers
119 views

Are .htaccess files required for EE install?

I'm discussing with my sysadmin about whether to allow .htaccess files. I noticed all over the EE file tree there are .htaccess files to prohibit access to files, such as to system/user/config/config....
3 votes
3 answers
1k views

Removing index.php but leaving subdirectory

We're working on a site that has Wordpress installed as the main CMS. EE is installed in subdirectory, and I am wanting to remove index.php. Everything I have tried removes both index.php and the ...
0 votes
3 answers
10k views

Too many redirects when forcing https on a template group

I'm having some trouble with forcing https on a given template group. If I use the following, I get the "too many redirects" error. If I comment out my "force SSL" conditions, everything else works ...
1 vote
0 answers
411 views

htaccess rewrite

I have an endpoint that I need to rewrite semantically for various reasons. The problem is it is an API endpoint and carries POST data. If I use a 301 or 302, the redirect happens, but I lose all data ...
1 vote
1 answer
207 views

Modifying .htaccess to include or remove

Has anyone had any luck combining the new .htaccess rules for removing index.php with a rule to add (or remove) the www string? Previously, we would use the following: RewriteEngine On ...
0 votes
1 answer
160 views

Simple Search form action is set to main site page

I'm trying to implement simple search on our blog. Previously we'd used the Google Custom Search Engine, but since they removed the pay as you go option to remove ads, competitor ads are showing up in ...
0 votes
1 answer
228 views

The right place to force SSL on entire domain

I'm not all that familiar with htaccess and in attempting to do this myself I'm getting a too many redirects error so I thought I would go to the experts. I'm just looking for the right place within ...
0 votes
1 answer
184 views

too many redirects EE 2.5.4

I have moved the site www.webawards.com.au and followed the information in regards to moving the existing site to a new server. I have a problem with too many 302 redirects and the hosting company ...
0 votes
2 answers
1k views

.htaccess changes broke site 'NOT FOUND' or CSS/JS missing

I was working on a clients site and after trying to add redirects from www to non-www the site unfortunately broke. I reverted back to the old .htaccess file and it is still not working. I looked ...
0 votes
1 answer
80 views

Expression Engine 3 upgrade causing links to break

I recently upgraded a site to EE3 and the EE2 version of the site was using .htaccess to remove index.php from the URLs. For example: foo.com/content/index.php/blog is instead foo.com/content/blog ...
2 votes
2 answers
302 views

Clean 301 redirects using an .htaccess that also removes index.php

I've got a somewhat standard .htaccess for removing index.php from my EE1 URLs: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/$ [NC] RewriteCond %{QUERY_STRING} ^(utm_source=.*) ...
3 votes
7 answers
30k views

How do I remove index.php from my URLs?

How can I remove index.php from my URLs? Please provide rationale for why the specific method should be used.
0 votes
2 answers
87 views

Control Panel won't log out, loops when logging back in randomly

I upgraded to EE 2.7.3 a few months back and recently added caching preferences to our .htaccess file for site optimization. Since these changes, I'm currently having two issues: Sometimes when I ...
5 votes
3 answers
18k views

Force SSL on some URLs but non-SSL on others with .htaccess

I'd like to redirect requests for certain urls to secure https with .htaccess rules. I found this excellent tutorial: https://exp-resso.com/blog/post/2011/08/securing-your-expressionengine-website-...
3 votes
2 answers
638 views

Querystrings on 'home' url go to 404 page

I've got a problem with an old site (running EE2.4) which is issuing a 404 if the URL contains a querystring. This is happening on the homepage only. i.e. http://www.example.com/?foo=bar causes a ...
2 votes
1 answer
1k views

htaccess rule for url with dot

A development installation has been set up for me that has cloned an existing site. However, the .htaccess file no longer works to remove index.php. Could this be because there is a dot in the URL? ...
0 votes
2 answers
15k views

Remove index.php and subdirectory in url string

I moved my site to a new hoster. Everything works fine (Images path's js css templates, all fine). I adjusted all path's with Reelocate. But all the Link in the Navigation throw back this error ...
7 votes
6 answers
3k views

Removing index.php rewrite not working

I use the official EE rewrite rule to remove index.php. This has always worked for me just fine... until now. I am using a hosting company that I've not used before and it is acting funny. The ...
0 votes
1 answer
43 views

.htaccess 301 for new structure from /blog/name to /blog/article/name

The title really says it all. I am by no means an .htaccess wizard. I rebuilt the site and have an old URL of: http://domain.com/blog/whatever I need all these to redirect to: http://domain.com/...
0 votes
1 answer
174 views

htaccess removing .php ext causes infinite loop on admin login EE 2.10.1

when I use this htaccess its normal working good but it doesnt redirect .php urls # Removes index.php from ExpressionEngine URLs # RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] # RewriteCond %{...
1 vote
2 answers
73 views

Need to host another application on server with EE

I have an EE instance on a server and need to host another PHP application in a subdirectory off the htdocs directory. How would I adjust the .htaccess to allow this application to run without going ...
1 vote
0 answers
153 views

Default .htaccess files and Apache 2.4 compatibility

I was just setting up a new site (2.11.2) and noticed (for the first time, I guess) that there are a few .htaccess files at various places in the code tree. They're quite simple, just a single line "...
0 votes
1 answer
142 views

Channel image and htaccess redirection

I'm working on a multilingual site.. Everything is working except Channel Images from DevDemon.. there is some infos and the structure -root |-index.php |-fr |-index.php |-htaccess (fr) |-en |...
0 votes
1 answer
52 views

ExpressionEngine 3 add back index.php through file

Did a little stupid thing the other day by removing index.php through control panel but not .htaccess. Now I can't access CP, and I need to add back index.php through the file, sort of manual way. I'...
0 votes
1 answer
108 views

Password Protect a Directory with .htaccess in root directory

I've created a directory in site root and used .htaccess/passwd files to build authentication. When navigating to that secure directory on front end I'm getting the EE 404 page template. Any ideas how ...
0 votes
2 answers
94 views

htaccess/redirection madness

Trying to access a google file on the server which is at http://www.norland.co.uk/googled096ea11cba5b121.html This is an ExpressionEngine build. My htaccess rules as follows: RewriteCond %{...
0 votes
1 answer
124 views

Multisite site home not loading

I'm missing something really simple... I have an MSM site that is subdomain.domain.com. These really simple .htaccess rules work ... kind of. RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] ...
0 votes
1 answer
220 views

$_POST empty but transferred

I am trying to access PHP's $_POST array from a template, using PHP within the template and have the expiration_date of the entry updated. The $_POST is empty, although the form is submitting to the ...
0 votes
1 answer
339 views

modifying .htaccess to remove index.php? breaks my access to the control panel

I recently took over from another developer and I'm having some trouble with my .htaccess breaking my admin control panel. My .htaccess file is as follows: RewriteEngine On RewriteRule ^case-...
0 votes
1 answer
190 views

.htacess not forcing www

Cannot get my site to force www. keeps showing a 404 (https urls) or 403 (http urls) server error. <IfModule mod_rewrite.c> # Force HTTPS RewriteEngine On RewriteCond %{...
0 votes
1 answer
418 views

Removing index.php & 301 redirects

I am using the following in my .htaccess file to remove index.php: <IfModule mod_rewrite.c> RewriteEngine On # Removes index.php RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{...
2 votes
1 answer
319 views

Remove 'home' folder from home page url

I have a url like this www.example.com/home/ and I cannot get rid of the home folder from the URL. The best I can do results in which causes the page to crash. I've been working with the htaccess ...
0 votes
1 answer
1k views

Mamp Pro .htaccess issues for 'index.php' removal on local domain

Using MAMP Pro I have an offline/local EE site setup. An htaccess file is set up in the root of the local domain site with the standard remove index.php script implemented (as shown in the offical ...
1 vote
1 answer
2k views

Remove question mark from url after search submit

I have a multi-language website and my second language goes to a subdirectory mysite.com/en/ Everything is fine but the search functionality. When I submit my search, it prints a question mark right ...
1 vote
1 answer
7k views

How to redirect empty url to a specific page

I have an event website and I want visitors to www.example.org to be redirected to www.example.org/todays-info "todays-info" is an entry, and I have "Enable strict URL'S" set to No so that I can ...
1 vote
3 answers
1k views

templates not being served, could it be .htaccess?

I've tried the tips here: 404 on Every Template and TPL group and here: 404 error on all templates but homepage after removing index.php I can access the index by using the default url (on my ...
3 votes
3 answers
1k views

ExpressionEngine and CORS?

I need to enable cross-domain AJAX requests on my site, while limiting the cross-domain access to a particular template. This template is in its own template group, so the requests from the script ...
0 votes
3 answers
201 views

Redirects from old site using queries to new EE site

I'm putting a new site live and need to redirect all the old pages to the relevant new ones. The issue is that the old site used PHP queries, whereas the new site doesn't. This means that if I setup ...
0 votes
1 answer
176 views

Remove index.php - interior pages are blank

I've got a site that works correctly on localhost and the staging domain, but after moving to the live server all interior pages return a 404 page. .htaccess has the following <IfModule ...