Jump to content

Search the Community

Showing results for tags 'htaccess'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. Hi, We copied the production source and configured it the same as the development source on the localhost. However, the website is not working on the localhost, whereas it is working fine on the production source. Please find the error attached. FYI - we have SSL for the production environment. Can anyone kindly help resolve this issue? Thank you
  2. Hi all I've built a website that contains 3 OnePagers. The structure is: - home (landingpage with links to sites a, b and c) -- site a -- site b -- site c -- other pages... Home has the main domain, let's call it main.com. the three pages are main.com/site-a, main.com/site-b and main.com/site-c. I'm looking for a way to have site a to c with their own domains, like site-a.com, site-b.com, site-c.com. these domain names should be visible in the url-bar of the browser (not main.com/site-a). Is there a way to do that? I want to keep it a single Processwire installation, not having three different ones (I know how to do that). Your help is very much appreciated. Thanks
  3. I'm trying to install Matomo on my host (world4you). For that purpose, I created a subdomain, a database and a folder in the root. In the subdomain settings I let it point to the created folder. However, the contents of the folder cannot be accessed in browser because it's redirecting to www So I have analytics.mydomain.tld and it's redirected to www.analytics.mydomain.tld I guess that's a .htaccess issue in the first place. But how do I amend the .htaccess-file of the site-root without affecting the main site? Here's I guess the relevant part of the .htaccess file # ----------------------------------------------------------------------------------------------- # 13. Optional domain redirects (O) # # Redirect domain.com to www.domain.com redirect (or www to domain.com redirect). # If using then uncomment either 13A or 13B, do NOT uncomment both of them or nothing will work. # ----------------------------------------------------------------------------------------------- # 13A. Redirect domain.com and *.domain.com to www.domain.com (do not combine with 13B): # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} !^www\. [NC] # RewriteCond %{SERVER_ADDR} !=127.0.0.1 # RewriteCond %{SERVER_ADDR} !=::1 # RewriteRule ^ %{ENV:PROTO}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # 13B. Redirect www.domain.com to domain.com (do not combine with 13A): # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] # RewriteRule ^ %{ENV:PROTO}://%1%{REQUEST_URI} [R=301,L]
  4. Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations. EDIT: A good solution for protecting original images can be found a bit down in this thread: Old content of this initial post:
  5. Some context: I want to use PHP variables in my CSS (more info below) and found a solution on CSS-tricks that looks fairly elegant and somewhat solid to me. It's pretty simple, I created a file style.css.php inside the site/templates/ directory and load that in my page head. In style.css.php is the following: <?php header("Content-type: text/css; charset: UTF-8"); header("Charset:utf-8"); if ($homepage->hero_image) { echo <<<CSS .hero { background: url($homepage->hero_image->url) no-repeat; } CSS; } ?> Because of the following RewriteCond (line 373) in the htaccess file the server sends a 403 error back when the file is requested: # Block access to any PHP or markup files in /site/templates/ or /site-*/templates/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))($|/) [NC,OR] (My htaccess file is @version 3.0 and @htaccessVersion 301) This is how I thought I could fix that (based on these answers on stack overflow) but it does not work: # Block access to any PHP or markup files in /site/templates/ or /site-*/templates/ RewriteCond %{REQUEST_URI} (^|/)(site|site-[^/]+)/templates($|/|/((?!style\.css).)*\.(php|html?|tpl|inc))($|/) [NC,OR] I tested the rule with htacess tester and htaccess check and both worked for me, but on my site I still get a 403 instead of the file. I'm working on localhost, using MAMP (not sure if that's relevant). A bit more about what I want to do achieve specifically: I want to use an image as a background-image for an element, not place it as an image. This image is provided by the user via a field and can therefore change. I know I can achieve this like this: echo "<section class='hero' style='background-image: url($page->hero_image->url)'></section>"; But I would prefer a method other than inlining because of scalability and cleanliness. (I admit the extra link in the page head is not ideal either) P.s. this is my first post here, I hope it's submitted in the right forum and my explanation is clear.
  6. Hi all My .htaccess file is correctly redirecting all requests to https:// www. That's great until I want to work locally. I thought I had seen a blog post by Ryan where there was a new config setting to ignore both of these if working from localhost? I can't find it now so wondering if I was imagining ?
  7. Is the right way to get Processwire to skip a folder (ie not process it as its running a different CMS) to put RewriteCond %{REQUEST_URI} !^/shop/.*$ just before RewriteRule ^(.*)$ index.php?it=$1 [L,QSA] in .htaccess?
  8. I am writing here instead of the ProCache forum because I have the impression that several nginx experts could solve this. In its new version, Procache proposes new .htaccess rules that are difficult to translate into nginx rules. We currently have a problem with the trailing slash of URLs which gives us a bad score in SEO analysis tools such as semrush.com. Indeed, a canonical URL is either without or with "/", but cannot be served by both options. Although ProcessWire without ProCache respects this rule, ProCache has no difficulty serving both, which is considered an SEO optimisation fault. I believe that ProCache version 2 solves this problem with these new rules, but I can't understand the following. Does anyone have any idea how to translate this into a nginx rule? Attached also the whole proposed .htaccess for ProcessWire. # PROCACHE v2/31885be14d6cfb4b2b0d3e533260bded -------------------------------------------------- RewriteCond %{REQUEST_METHOD} !=POST RewriteCond %{QUERY_STRING} !.*=.* RewriteRule ^.*/$ - [E=pwpcstep:pour,E=pwpcname:index] RewriteCond %{ENV:pwpcstep} "=pour" RewriteCond %{HTTP_COOKIE} !^.*(wire_challenge|wires_challenge).*$ RewriteRule ^.*/$ - [E=pwpcstep:stir,E=pwpcpath:%{DOCUMENT_ROOT}/site/assets/ProCache-00478359c5e65dbada1075bfbd4] RewriteCond %{ENV:pwpcstep} "=stir" RewriteCond %{ENV:pwpcpath}/$0/%{ENV:pwpcname}.html -f RewriteRule ^.*$ - [E=pwpcstep:drink,E=pwpcfile:$0/%{ENV:pwpcname}.html] RewriteCond %{ENV:pwpcstep} "=drink" RewriteRule ^(.*) %{ENV:pwpcpath}/%{ENV:pwpcfile} [L] <ifModule mod_headers.c> Header set X-PWPC "ProCache" env=pwpcstep Header set X-Powered-By "ProcessWire CMS, ProCache" env=pwpcstep </ifModule> RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$" # /PROCACHE ------------------------------------------------------------------------------------- .htaccess-procache
  9. Hi Community, Sadly I cannot intall ProcessWire on my webserver (Hosted at https://www.world4you.com/de/startseite.html, a small hosting provider in Austria) Here is the Problem: 1. I downloaded the current masterbranch as a .zip file (After a few tries I also downloaded the code via the git clone command, that led to the same error), unzipped it and transferred it to my server. Since there is already a wordpress site installed on the root directory, I transferred the processwire files into /relaunch and created a subdomain. 2. I tried to install the language starter kit. As soon as I navigate to that folder Screenshot1 (see attached file 'processWireBug1') is shown. Everything looks nice, except the red text referring to the 'mod_rewrite' rule. The webserver provides the 'apache mod_rewrite' rule. 3. As soon as I want to press 'Check again' or 'Continue to next step' an error Page with 500 error (see Screenshot 'processWireBug2') occurs. 4. You can find my .htaccess file attached to this post..htaccess How could I solve this issue? Some additional information: 1) the webserver provides the apache mod_rewrite (I checked that several times) and has php version 7.3. installed. 2) since there is a wordpress site installed on the root directory, there is also a .htaccess file on the root directory. Could this .htaccess file have an impact on the .htaccess file for my processwire website? Thanks for your help and greetings from Austria, Daniel
  10. 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 (world4you.com) 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
  11. Can anyone tell me which .htaccess directive might be blocking a site import feature from scanning my public_html folder and listing all files and folders. These would be both PW files/folders but also some non PW folders which my PW site references for media. Latest .htaccess file on Github I can see various options from Section 15 onwards (# 15. Access Restrictions (v301)) but nothing that would block both SSH and FTP scans my VPS site import file uses. When I point the same site import tool at a non PW site on the same directory it works. I could disable htaccess temporarily but it's a busy and active site. Thanks P
  12. Hello everyone, hopefully this is the right place to ask and is not a duplicate question. I'm pretty new to processwire, so... if this question is kind of funny for some of you, you're welcome ? I have the following issue and can't find anything understandable about it. Maybe I'm searching the wrong way, but anyways.. here is my question: How is it possible to rewrite the URLs, that I'll get a *.php ending? Example: https://www.mysite.de/urlsegment/ -> https://www.mysite.de/urlsegment.php https://www.mysite.de/urlsegment/urlsegment/ -> https://www.mysite.de/urlsegment/urlsegment.php Because I've read a lot about "Why do you wanna do this or have that?" – here my answer for that in advance: I've built a processwire installation inside or around an existing website. Therefore, we want to keep the existing *.php Google entries. Sure, we could redirect via 301 Redirect, but would prefer to keep the *.php ending. If you have further questions, please do not hesitate to ask. Thank you in advance for your help. – Best regards ce90
  13. Hi Guys How can I make a redirect inside the .htaccess to my custom maintenance.html file when any URL of my Website is accessed except the processwire admin (www.example.com/processwire/). Because I want that my User's still can access the website when they are loggedin in Processwire. When the current url starts with /processwire or if there is a processwire-login-cookie (Is there a cookie when user is logged in Processwire?) available the redirect should not work. Otherwise it should work. How can I achieve this?
  14. Hi! How to make 301 redirect from www.site.com/news/hereisthepost/ to www.site.com/blog/hereisthepost/ ?
  15. 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 thepaleofix.com to dranthonygustin.com 2) I moved every single path individually with redirects like this: Redirect 301 /category/post http://www.dranthonygustin.com/category/post Everything smooth sailing until today when through webmaster tools (to say site address as moved) I had to execute "Redirect 301 / http://www.dranthonygustin.com" -- now some of the urls go through and some don't include the / after the .com extension. For example: http://www.thepaleofix.com > http://www.dranthonygustin.com no problem http://www.thepaleofix.com/resource/purepharma-m3-review/ > http://www.dranthonygustin.com/what-does-magnesium-do/ no problem BUT a bunch of the URLs then don't push... For example: http://www.thepaleofix.com/recipe/paleo-jam > http://www.dranthonygustin.comrecipe/paleo-jam/ (notice NO / after the .com extension) and http://www.thepaleofix.com/wp-admin > 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 http://www.dranthonygustin.com/simple-vanilla-berry-paleo-jam/ Any idea why after implementing the / redirect, why it broke some of the redirects and not all? Thanks!
  16. Hi there, a few weeks ago I completed a 3.098 installation (server php 7.2). Yesterday I wanted to login but failed. I tried different browsers, meanwhile on two different PCs, but no login. Then I realized, that after hitting the »Login« button, there was no message (admin name – Login failed). I also tried all procedures (https://processwire-recipes.com/recipes/resetting-admin-password-via-api/). Then I checked the errors.txt (site/assets/logs) – nothing. The frontend works fine. Is there a way to check this Processwire installation? Could be something missing?
  17. Greetings. I would like to restrict access to certain sections of my organization's ProcessWire site using pubcookie. We are rolling out Shibboleth authentication later this year but for now, it seems I can only make use of our institution's single sign-on routine by utilizing rules in an .htaccess file. I am wondering if there is a way to ask PW to apply these rules to certain pages in the site, whether via template type or location in the page tree: AuthType UWNetID PubcookieAppID "MyApplication" require type staff faculty
  18. 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?
  19. 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.
  20. 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 mail.example.com which is redirected to www.mail.example.com 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.
  21. 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]
  22. 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: http://www.helicontech.com/ape/ (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
  23. 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?
  24. I have a single Processwire install with two domains pointing to it. There's in-progress.com which is the "proper domain" and won't be live for a few months mini-project.com 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 mini-project.com, keep that address is the browser bar and redirect to mini-project.com/project-home/ To give a little context, a part of the in-progress needs to be accessible immediately and we've registered that temporary mini-project.com and pointed it at the same site. The key here is to only do that redirect when mini-project.com is the source request. Otherwise I guess I'd use Jumplinks etc
  25. 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än.de to http://my-domaein.de i've somethings like this in my htacess: ##redirect umlautdomain (not my domain) RewriteCond %{HTTP_HOST} ^xn--mhldorf-nsb.d$ [NC] RewriteRule ^(.*)$ http://muehldorf.de//$1 [R=301,L] in my config.php i only have muehldorf.de 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
×
×
  • Create New...