Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [htaccess]

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

0
votes
1answer
31 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
2answers
50 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....
1
vote
0answers
183 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 ...
0
votes
0answers
13 views

All URLs attempt to download page not display

Just moved the site to a new server and is currently live. Edited the site base URL and server path to reflect new server settings. Added following to .htaccess to remove index.php from URL. ...
0
votes
1answer
38 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
1answer
63 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
1answer
114 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
0answers
37 views

Windows 7, IE 11 and Database connection

EE 2.10.1 | PHP 5.4.45 We are receiving the following error only when trying to load the site homepage and only in this very specific instance: Windows7 and IE11 Site Error: Unable to Load Site ...
0
votes
2answers
420 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
1answer
67 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 ...
0
votes
2answers
136 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 ...
2
votes
1answer
437 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
1answer
42 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
1answer
104 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
2answers
66 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
0answers
120 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
1answer
45 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
1answer
72 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
1answer
85 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
1answer
150 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
1answer
171 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
1answer
287 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 %{...
0
votes
1answer
134 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
1answer
641 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 ...
2
votes
2answers
242 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=.*) ...
0
votes
1answer
1k 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 ...
2
votes
1answer
227 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
1answer
2k 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 ...
3
votes
2answers
272 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 ...
0
votes
2answers
90 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 %{...
1
vote
1answer
1k 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 ...
0
votes
1answer
121 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 ...
0
votes
1answer
987 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
0answers
114 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 ...
1
vote
1answer
218 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, ...
0
votes
1answer
156 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....
3
votes
3answers
907 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
1answer
414 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:...
0
votes
1answer
347 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 ...
0
votes
1answer
673 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
1answer
137 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
1answer
36 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 ...
0
votes
3answers
171 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
1answer
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 ...
1
vote
1answer
463 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 ...
1
vote
2answers
112 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 ...
0
votes
1answer
52 views

Redirect from Member/Register is not working

In order to prevent unwanted member registration I have set up a redirect from the member/register page using the following code in the .htaccess file: Redirect 301 /member/register http://sitexyz....
1
vote
3answers
90 views

Howto trim incoming URL's

So I've recently moved a blog from Wordpress to ExpressionEngine. Everything transferred over great (thanks to DataGrab!!). Now the one problem I'm having is in my attempt to redirect traffic from ...
0
votes
1answer
1k views

HTACCESS issues with multiple redirects

I'm having a hard time figuring out how to re-direct multiple portions of a site to the https:// version. What I have so far does work, it just randomly throws in an extra '?' sometimes? <...
1
vote
1answer
3k views

Remove question mark in URL with “Force URL query strings” enabled

in one of my sites I had to enable "Force URL query strings" because my hosting provider doesn't have "URL Segment Support" enabled. I don't have the permissions to change Apache configuration file ...