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 42 results

  1. I installed an SSL Certificate, then edited my .htaccess file: # ----------------------------------------------------------------------------------------------- # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] by uncommenting out the Rewrite lines. The main site loads as https, but now I get 404 error pages when I try go to any subpage: .../processwire-master/<pagename>/ This includes my admin page at .../processwire-master/processwire/, so i can't get into my admin. After this, in .htaccess I uncommented out RewriteBase / and RewriteBase /processwire-master/ still not working...
  2. I installed an SSL Certificate, then edited my .htaccess file: # ----------------------------------------------------------------------------------------------- # 9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] by uncommenting out the Rewrite lines. Now I get 404 error pages when I try go to any .../processwire-master/<pagename>/ This includes my admin page at .../processwire-master/processwire/, so i can't get into my admin. What else do I need to do?
  3. Hello, 1. Anybody can help, why this htaccess (location in root) doesn't work at 3.0.98 ? it show 404 RewriteEngine on RewriteRule ^(.*)$ /subdirectory/$1 [L] That rule works in 3.0.62 It redirect root request to subdirectory processwire installation and hiding the subdirectory name in url. I have try to uncomment htaccess inside subdirectory processwire installation : RewriteBase /pw/ to RewriteBase /subdirectory/ Doesn't help, still 404 when open the site from root domain. 2. Is there anyway to find processwire version from processwire files ? not from admin login page. Thank you.
  4. I moved my site to Google cloud platform and i am stuck some where. my homepage is working fine but when it comes to other pages it says 404 not found and when i add this on virtual host <Directory "/var/www"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> or <Directory "/var/www"> AllowOverride All </Directory> I receive internal server error I tried comment out this line to but still same thing # RewriteBase / and # RewriteRule ^(.*)$ /index.php?it=$1 [L,QSA]
  5. 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
  6. 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
  7. 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
  8. 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?
  9. 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
  10. 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.
  11. 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
  12. 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.
  13. 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?
  14. 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.
  15. 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>
  16. 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
  17. 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!
  18. 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
  19. 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
  20. 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?
  21. 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
  22. 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
  23. 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
  24. 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!
  25. 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!