Stack Exchange Network

Stack Exchange network consists of 175 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
8 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
2answers
25 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 ...
-1
votes
0answers
15 views

Migrated Site, Can't Get Internal Pages to Pull Up

This week I moved a site from ispmanager to cPanel. The home page is pulling up but the internal pages are not. External links are working off the home page. The internal pages though, they all ...
0
votes
1answer
34 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
1answer
49 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
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
81 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
244 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
1answer
45 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
107 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
129 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
2answers
597 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
68 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
173 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 ...
3
votes
1answer
518 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
123 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
67 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
128 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
47 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
83 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
90 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
155 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
196 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
317 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
152 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
709 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
253 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
239 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
325 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
92 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
132 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
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
0answers
123 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
225 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
158 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
977 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
423 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
359 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
722 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
138 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
37 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
177 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
471 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
113 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
58 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....