Search the Community

Showing results for tags 'htaccess'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk


There are no results to display.

Found 38 results

  1. Hi Guys, I'm trying to do my first migration to the customers existing server (IIS 10) . I ran the site as a subdirectory on my website for test purposes (everything works fine). Following the tutorial of Joss, I tryed the site on a local xampp server to make sure, it also works on a root directory. So far so good, everything works. Now I moved the files (from the xampp) to the customers server. The root/index page is shown but for every subpage i get 404 Errors... Hence I followed the troubleshooting guide for not working URLs: On the first sight, the .htaccess file is not recognized, therefore I contacted the host support. They said, it is recognized but not all modules are supported in the processwire .htaccess file. I did the "öalskjfdoal" test in the .htaccess file and didn't get a 500 Error.... BUT the rewrite rule from the hosts support, to proof the file is read, DID work... The support claims, they do not provide debugging... so basically the .htaccess file is recognized and working, but not throwing any errors (for whatever reason). Working rewrite rule (from support): RewriteEngine On RewriteBase / RewriteRule ^test\.asp$ index.html [NC,L] RewriteRule ^test\.html$ konzept.html [NC,L] RewriteRule ^test2\.html$ team.html [NC,L] The support said, a couple modules are not supported in the htaccess file, the supported ones are listed here: (I think mod_rewrite is supported) As I do not completely understand what exactly is happening in the htaccess file, I'm stuck. I tried all suggestions I found regarding this topic on the forum, but none of them solved the problem. .htaccess.txt
  2. Hi Guys, Just finished a website locally and wanted to upload it on the webserver of my customer. I got a server 500 error. Now, the guidelines of the hoster ( does not allow "Options" in the htaccess-file. So, when I uncomment these: Options -Indexes Options +FollowSymLinks the site is visible, but the content won't show and no links are available. Not sure if I need the Symlinks-part but I guess I need a workaround for the Index-part. Can anybody help here? I need the website up and running asap.... Thanks! Roli
  3. I have a single Processwire install with two domains pointing to it. There's which is the "proper domain" and won't be live for a few months which needs to go live immediately but just point to a sub-page Is there a way with .htaccess to know when the site is being accessed through, keep that address is the browser bar and redirect to To give a little context, a part of the in-progress needs to be accessible immediately and we've registered that temporary and pointed it at the same site. The key here is to only do that redirect when is the source request. Otherwise I guess I'd use Jumplinks etc
  4. I'm trying to direct all pages from their www and http versions to their non www https versions but I'm experiencing some really strange redirecting behaviour instead. When I uncomment the http to https lines in the htaccess, I get a too many redirects error on my site I thought that Processwire by default redirected from www to non www? When I apply the following line after the Processwire directives RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] The redirecting seems to work fine but for some reason many of the pages redirect to the homepage. I don't know if its a factor but I have jumplinks and multi-language installed and running. I've removed all custom rules from the htaccess just so that people see the pages they click on from search engines, but I'm hoping this can be resolves quick. Ideas?
  5. Like title says i've some domains with umlauts öäüß and i'd like to redirect them to the non umlaut version example: http://my-domä to i've somethings like this in my htacess: ##redirect umlautdomain (not my domain) RewriteCond %{HTTP_HOST} ^xn--mhldorf-nsb.d$ [NC] RewriteRule ^(.*)$$1 [R=301,L] in my config.php i only have in my hosts list... is there something that i've misunderstood? so far it doesn't work....but may the htaccess rules take some time to exicute...i tried since about an hour some different rules. regards mr-fan
  6. Hey, I've used ProcessWire for a while now but not made an appearance in the forum yet I just wanted to share the solution to a small problem I came across with Let's Encrypt (free SSL service). Let's Encrypt SSL certificates need to be renewed every few months to remain active. My web host does this automatically but needs access to a folder named ".well-known", which ProcessWire blocks by default because it starts with a dot. This results in a 403 error. To work around this, just add the following line to your .htaccess file, around line 150: RewriteCond %{REQUEST_URI} !^(/\.well-known) It should be the first condition in the section titled "Access Restrictions: Keep web users out of dirs that begin with a period". I also ran into another problem. Let's Encrypt accesses which is redirected to because I enabled the redirection in my .htaccess fie. So we need to exclude the mail sub domain from that rule using the following line as the second condition in the www-redirection section (around line 160): RewriteCond %{HTTP_HOST} !^mail\. [NC] I know it's quite a specific problem but maybe it'll help someone Googling the issue. I was curious, is there any way of redirecting to the www-version without having to exclude all your sub domains? The only way I can think of involves explicitly writing out your domain name in the .htaccess file and redirecting whenever the %{HTTP_HOST} starts with that name. But obviously that would lead to a loss of generality.
  7. Hi all, this is my first post here - so let me say first: I love ProcessWire! I have the following scenario: On my website users will be able to create their own site. This site is a page (in this case 'theirsite'): "" Now I want that they can use their own domain. So this domain needs to load their page: "" goes to "" but while showing the first domain in the browser. I'm trying to archive this with an htaccess entry: RewriteCond %{HTTP_HOST} www\.retuschierenlernen\.de RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?it=retuschierenlernen/$1 [L,QSA] I get the following error, because it loads the my main site, not the page of my user: Warning: file_put_contents(/www/mysite/test/html/site/assets/cache/FileCompiler/site/templates/public-site.php): failed to open stream: Permission denied in /www/mysite/test/html/wire/core/FileCompiler.php on line 327 Thanks! Dennis
  8. Long time listener, first time caller... I have been working with ProcessWire for some time now and it has been amazing, my go to CMS. Previously my workflow had a local development setup through MAMP using an address like http://localhost:8888/websites/ I have recently changed this in preference of, that way I do not need to disable the .htaccess forward from non-www to www to develop locally. My .htaccess forward is setup like: RewriteCond %{HTTP_HOST} !^dev\. [NC] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] This works on all sites that are still using ProcessWire 2.5, however on sites using 2.8 and 3.0 I am getting a 403 Forbidden error. After reading through the forum posts related to 403 errors I have not been successful in finding a solution for my issue. Has anyone experienced this or can assist? Thank you very much in advance, the forum community has been so helpful I have never needed to post until now.
  9. Trying to do some ajax calls to an api named using intercoolerjs in my home page. I'm trying to make calls like this in intercoolerjs. Looked through a bunch of the posts but nothing seems to match what I am trying to do. Is there a change I can make to the htaccess file to get this to work? Anyone have a suggestion on this or is there a better way to handle the api?
  10. I have web hosting with the following .htaccess en root, to point it to a subdirectory "", wherein I have PW installed: RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?$ RewriteCond %{REQUEST_URI} !^/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /$1 RewriteCond %{HTTP_HOST} ^(www.)?$ RewriteRule ^(/)?$ [L] RewriteCond %{HTTP_HOST} ^(www.)?$ RewriteRule ^(/)?$ [L] However when I go to to access the admin, it becomes, and doesn't allow me to log in. How do I render the above to be recursive (?), i.e., to apply to all subordinate URLs? Is this to be done within the .htaccess in /, or in the root .htaccess above? Please help, I can't log in. Thanks much.
  11. I have a VueJS single page app with a router, how do I redirect all requestes to the index.php page? The processwire .htaccess file is quite big I am not sure how to change it. This is what is suggested in the router docs: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule>
  12. I am a newbie installing for the first time. I am on a Mac and get /.htaccess doesn't exist. Before continuing, you should rename the included htaccess.txt file to be .htaccess (with the period in front of it, and no '.txt' at the end)., but I cannot start a filename in OS X with a period - at least that is what the OS tells me in a message. What do I do? Is there some trick or workaround I can use? I can't be the only one to have faced this problem. Thanks all! David
  13. Hey all, things had been going well remapping a site from one domain to another, but hit a snag and have searched for hours and don't know how to continue. 1) I was moving everything from to 2) I moved every single path individually with redirects like this: Redirect 301 /category/post Everything smooth sailing until today when through webmaster tools (to say site address as moved) I had to execute "Redirect 301 /" -- now some of the urls go through and some don't include the / after the .com extension. For example: > no problem > no problem BUT a bunch of the URLs then don't push... For example: > http://www.dranthonygustin.comrecipe/paleo-jam/ (notice NO / after the .com extension) and > http://www.dranthonygustinwp-admin (which of course leads to dead link) There are a bunch of paths that do this, that I checked before and were working, such as: Redirect 301 /recipe/paleo-jam Any idea why after implementing the / redirect, why it broke some of the redirects and not all? Thanks!
  14. Hi all, I'm experimenting building a content site based on AngularJS and Processwire. I‘ve turned on the html5Mode in angularjs, everything works so far re agularjs routing, but when I try to refresh a page, only loads a page without header (thus no js/style). This to me seems a classic problem with server setup ( ), which requires htaccess setup (I'm on Apache server). But not quite sure how to set up the htaccess? Attached is my htaccess, with below are some routing settings of angular: scotchApp.config(function($routeProvider,$locationProvider) { $routeProvider .when('/news', { templateUrl : 'news', controller : 'mainController' }) .when('/about', { templateUrl : 'about', controller : 'aboutController' }) .otherwise({ templateUrl : 'news', controller : 'mainController' }); $locationProvider.html5Mode(true); }); THANKS advance for all your help! htaccess.txt
  15. Hi, I'm running several speed tests for my personal site using My site has the ProCache module installed. The lifespan is set to 1 week, but I am not sure it is the same as the expire date seen in the following report : WebpageTest for Setting Expire Headers can be done in .htaccess. I don't want to interfere with ProCache, but would like to understand what I can do here. Thanks
  16. Hello, I need to redirect the old paths after migration to a multisite PW installation. There are 3 domains and small differences between paths i.e. old path: domain-2/?text new path: domain-2/text or domain-2/new_text I try it via .htaccess (in the root direction) with an 301 redirect: redirect 301 domain/old_path domain/new_path -> generates an 500 server error What is wrong? How to do that?
  17. Hi folks, I have a PW site set up in the root of a domain, (reachable via, and, with an static index.html and respective directory index entry in .htaccess added (DirectoryIndex index.html index.php ), since the site is still in development. Now, suddenly, this is not working anymore, entering redirects to the root (and thus the .html), although I can still reach just fine! I had a look at the htaccess changes since I recently updated from 2.x to 3.0.6, including .htaccess, but there didn't seem to be any difference (not counting the added directory index entry of course) to the old, working htaccess. Can anybody share any clue on what might be off here? Cheers guys! Phil
  18. I moved an old site to processwire and want to redirect the old URLs with php-filenames to the new folders via .htaccess to match the new structure. I tried: RedirectMatch 301 /filename.php The Browser end up like this: Its interfering with that Processwire .htaccess rule # ----------------------------------------------------------------------------------------------- # Pass control to ProcessWire if all the above directives allow us to this point. # For regular VirtualHosts (most installs) # ----------------------------------------------------------------------------------------------- RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] If i comment that out the redirect in the URL is ok, but every Klick on a websitelink is showing the homepage. Any idea how i can fix this? Thanks Andreas
  19. Hi I'm having a strange problem and can't figure out what's going on. On my processwire installation from time to time (very rarely actually, about 1 every 2 motnhs) my htaccess file is overwritten with an almost empty file, only containing: AddHandler x-mapp-php5.4 .php3 .php4 .php .phtml Maybe someone on here has experienced that before? Thanks for any help Peter
  20. Hi there, I'm having issues installing the latest PW version. Upon installing i get this weird error message «mysql 1146 table doesn't exist», although it does. I went through the forum and looked for answers elsewhere on the internet, couldn't find a solution. I tried to comment out a few things in the .htaccess, as often suggested, and went so far as to comment out everything, it still won't work. I can get to the frontend every now and again, i can even log into the backend sometimes. But most of the time i get a «Internal Server Error» message. I contacted the hoster but they think it's an issue with PW and not with they're hosting (of course ;-). Any suggestions as to how to fix it? Thanks!
  21. Hello, I work on a PW version of this site : The PW works at this URL: When I move the files at the root, I've an error 500. When I try to change each 500 notes or rewrite base in the htaccess, nothing works more. Remember that it works in /v2/ ! After, I rename .htaccess in htaccess.txt and the error still remains... No PW logs in the assets about this error. But in the server logs : PHP Fatal error: require(): Failed opening required '/srv/data/web/vhosts/' (include_path='.:/usr/share/php:/srv/data/web/includes') in /srv/data/web/vhosts/ on line 18 Like it still load the v2 when I load the root index... and at this time, there's nothing in this /v2/ directory as I've moved them at the root. Does anyone understand something? Thanks for your help!
  22. Hi Guys, I have processwire installed on a site which was working fine up until very recently. I am getting the error Unrecognized HTTP host: My config file is as follows; $config->httpHosts = array( 'localhost', // our primary hostname '', // staging server '' // Live server ); I have updated the htaccess file to the most recent. I cannot update any content at the minute I am getting this error: Cannot be published until errors are corrected Can anyone help please? Warmest wishes, Mel
  23. Hi, I've been using PW for a while now, and I've been happy with it so far, but I've decided to stop using .htaccess files on my server as it severely impacts performance. I've tried moving the contents of PW's .htaccess file into my website's virtual host config file. The problem is, once I do that, I can't access my website, as the server just throws 400 Bad Request errors all over the place. So, is there a way to get PW to run without having an .htaccess file in place, that is, having its directives in an Apache virtual host config file instead? Thank you, and happy new year!
  24. Hello everyone, I have a problem with a password protected folder. When I try to access it, I get a «404 page not found» error. First, here is the file structure: / - public_html - guestcal - admin (protected) - wire - site - etc … The protection was created through my hosts backend. This automatically created a .htaccess file in the folder «admin» with the following content: AuthType Basic AuthName "Administration Kellervermietungen" require valid-user AuthUserFile "/home/schloss2/.htpasswds/public_html/guestcal/admin/passwd" I have an alternative url to the site from my host ( When I prepend this instead of the domain name in the browser, the url ( works fine. I have zero experience with .htaccess stuff … Is there a conflict with pw? Can someone help? Thanks a lot, tron1000
  25. Hello guys I'm new here! I've been working on this website that I've made with Foundation. I wanted to put a CMS in it so now i'm here! On my localhost the website works perfect. I've adjusted the Processwire CMS to my wishes and with /login I and other users would be able to change the texts on the website. So I thought I was ready to put it live. I exported the MySQL files. Created a new db. Imported everything. And via an FTP client uploaded all the files. The homepage works fine. But now whenever I want to login using /login which I changed /processwire to I get a 404 error: Not FoundThe requested URL /login was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. What am I doing wrong here? I've checked a lot of messages on this forum about the .htaccess file but I haven't got it to work yet and need help from more experienced PW users:) This is my website: http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ----------------------------------------------------------------------------------------------- # Access Restrictions: Protect ProcessWire system files # ----------------------------------------------------------------------------------------------- # Block access to any htaccess files RewriteCond %{REQUEST_URI} (^|/)\.htaccess$ [NC,OR] # Block access to protected assets directories RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) [OR] # Block acceess to the /site/install/ directory RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/install($|/.*$) [OR] # Block dirs in /site/assets/ dirs that start with a hyphen RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets.*/-.+/.* [OR] # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ [OR] # Block access to any PHP-based files in /templates-admin/ RewriteCond %{REQUEST_URI} (^|/)(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ [OR] # Block access to any PHP or markup files in /site/templates/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ [OR] # Block access to any PHP files in /site/assets/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/assets($|/|/.*\.php)$ [OR] # Block access to any PHP files in core or core module directories RewriteCond %{REQUEST_URI} (^|/)wire/(core|modules)/.*\.(php|inc|tpl|module)$ [OR] # Block access to any PHP files in /site/modules/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ [OR] # Block access to any software identifying txt files RewriteCond %{REQUEST_URI} (^|/)(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ [OR] # Block all http access to the default/uninstalled site-default directory RewriteCond %{REQUEST_URI} (^|/)site-default/ # If any conditions above match, isssue a 403 forbidden RewriteRule ^.*$ - [F,L] # ----------------------------------------------------------------------------------------------- # Ensure that the URL follows the name-format specification required by ProcessWire # ----------------------------------------------------------------------------------------------- RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # ----------------------------------------------------------------------------------------------- # If the request is for a file or directory that physically exists on the server, # then don't give control to ProcessWire, and instead load the file # ----------------------------------------------------------------------------------------------- RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !(favicon\.ico|robots\.txt) # ----------------------------------------------------------------------------------------------- # OPTIONAL: Prevent ProcessWire from attempting to serve images or anything in /site/assets/. # Both of these lines are optional, but can help to reduce server load. However, they # are not compatible with the $config->pagefileSecure option (if enabled) and they # may produce an Apache 404 rather than your regular 404. You may uncomment the two lines # below if you don't need to use the $config->pagefileSecure option. # ----------------------------------------------------------------------------------------------- # RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|ico)$ [NC] # RewriteCond %{REQUEST_FILENAME} !(^|/)site/assets/ # ----------------------------------------------------------------------------------------------- # Pass control to ProcessWire if all the above directives allow us to this point. # For regular VirtualHosts (most installs) # ----------------------------------------------------------------------------------------------- RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] # ----------------------------------------------------------------------------------------------- # 500 NOTE: If using VirtualDocumentRoot: comment out the one above and use this one instead. # ----------------------------------------------------------------------------------------------- # RewriteRule ^(.*)$ /index.php?it=$1 [L,QSA] </IfModule> ################################################################################################# # END PROCESSWIRE HTACCESS DIRECTIVES ################################################################################################# What am I doing wrong? Thanks in advance! htaccess.txt