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
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 ...
mediapimp's user avatar
  • 741
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): ...
friday_james's user avatar
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://...
Marko's user avatar
  • 1
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 ...
James Cottis's user avatar
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 ...
supernaut's user avatar
  • 101
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 ...
BNetz's user avatar
  • 470
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 ...
Andris's user avatar
  • 103
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....
jphansen's user avatar
  • 627
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 ...
W3bGuy's user avatar
  • 1,610
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 ...
Amanda L's user avatar
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 ...
Jean St-Amand's user avatar
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 ...
Helen Burgess's user avatar
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 ...
Fox's user avatar
  • 11
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 ...
Tim Willis's user avatar
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 ...
Andrew's user avatar
  • 393
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? ...
Andrew's user avatar
  • 393
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/...
W3bGuy's user avatar
  • 1,610
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 %{...
simpleton's user avatar
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 ...
MB34's user avatar
  • 330
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 "...
Andy's user avatar
  • 515
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'...
TSlegaitis's user avatar
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 ...
frshjb373's user avatar
  • 273
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] ...
jrothafer's user avatar
  • 5,900
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 ...
gonn's user avatar
  • 3
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-...
Matt Dowis's user avatar
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 %{...
mediapimp's user avatar
  • 741
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 %{...
Thomas K's user avatar
  • 155
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 ...
Karl Bowers's user avatar
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=.*) ...
Sandwich's user avatar
  • 542
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 ...
TipsyDriver's user avatar
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 ...
benny05's user avatar
  • 21
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 ...
Paul Frost's user avatar
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 ...
foamcow's user avatar
  • 7,176
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 %{...
Cole Henley's user avatar
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 ...
Hossein Haji Mali's user avatar
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 ...
CreateSean's user avatar
  • 4,757
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 ...
oliverb's user avatar
  • 170
0 votes
0 answers
173 views

After removing index.php from URL, pages on the host server are being displayed instead of the pages that were created in EE

I wanted to remove the index.php the shows up in the URL. I used this guide: https://ellislab.com/expressionengine/user-guide/urls/remove_index.php.html The 'index.php' is removed but some pages are ...
Beni's user avatar
  • 11
1 vote
1 answer
250 views

CE Cache Static not serving cached home page

I am using CE Cache Static driver. All is getting cached and served as expected except for the home page. It is getting cached, but not served. I believe it is due to the below line of the htaccess, ...
Matt Fordham's user avatar
0 votes
1 answer
178 views

redirect domain to another subdomain

I got a request to redirect the current domain for a website to another one. So the basic scenario is: Site is hosted on domain.com and should stay there, but all the links should be shown as site....
Dovla's user avatar
  • 77
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 ...
user3776457's user avatar
0 votes
1 answer
507 views

Index.php redirect based on url

I have been struggling with managing domains for two separate EE installations. Htaccess redirects only seem to work with the site's homepage. Anything beyond that results in a 404 error. For example:...
Ty Morton's user avatar
  • 322
0 votes
1 answer
387 views

htaccess rules for subdomains?

I am working on a site that is on a subdomain with a structure that looks like this: http://dev.domain.co/sites/project/ I would also like to remove the index.php. I looked at THIS THREAD to see if ...
MelPax615's user avatar
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 ...
Lacer's user avatar
  • 127
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 |...
Benoit L's user avatar
  • 554
0 votes
1 answer
50 views

append .xml to EE template

Client has a podcast feed that up until now has been a manually edited XML file on their server. I'm looking to move this into EE so that they don't need to touch the server directly. Because this ...
Steven Grant's user avatar
  • 2,473
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 ...
Tom Perkins's user avatar
0 votes
1 answer
1k views

Remove trailing slash from URLs

I would like to remove all urls with trailing slashes using the .htaccess file. I have tried a couple peices of code suggested on other questions but does not work. Any suggestions on how to do this ...
Thomas K's user avatar
  • 155
1 vote
1 answer
487 views

htaccess redirect to url without www with site in a sub-directory

I have a site running in a sub-directory and I'm using this htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # Removes index.php from ExpressionEngine ...
worfoual's user avatar
  • 289
1 vote
2 answers
132 views

Bets way to protect direct link?

I am using Channel Images and obfuscating the links so a user cannot see the path, but I want to protect the full link using htaccess well. The user will be able to see the images, zips, or files in ...
CJbrian's user avatar
  • 195