... ($ENV{'HTTP_HOST'} =~ /(d+).(d+).(d+).(d+)/){$t='/'}else{if ($server !~ /^www./){$server = '' . $server;}}@domains = keys(%domains);foreach $domain(@domains){if ($domain eq $server){print "Location: $domains{$server}nn";$match="yes";last;exit}}unless($match){print "Location: nn";exit}exit ; ``` and the .htaccess file is: ``` RewriteEngine on #RewriteEngine On #RewriteCond %{SERVER_PORT} 80 #RewriteRule ^(.*)$ $1 [R=301,L] RewriteCond %{SERVER_PORT} ^2082$ RewriteRule .* https://%{SERVER_NAME}:2083%{REQUEST_URI} [R,L] # -FrontPage- AuthUserFile /home/feetsdr/public_html/_vti_pvt/ AuthGroupFile /home/feetsdr/public_html/_vti_pvt/ DirectoryIndex <Limit GET POST>
Urgently needing expertise to resolve a critical WordPress issue. it shows this: # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L # END WordPress instead of showing the website
I am lookin...use subfolders as multistore on OC3 with PHP 8+ Service Custom Websites Description Have used OC1.5.5.6 with multistore. Created additional folders in root..../uk/ and /us/ and /au/ etc. so have etc In Folders eg. /UK/ etc have only 2 files and .htaccess ... file is <?php include('../'); ?> .htaccess includes: # SEO URL Settings RewriteEngine On # If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase /uk/ -------------------- Multistore works fine in 1.5.6.5 Have a fresh install of 3.08 - maintenance - with php 8X support. Need files to make multistore work with sub-folders. ie /uk/us/au/ etc Website Type E-Commerce Website Type PHP
...ProxyPass / ProxyPassReverse / SSLEngine on SSLCertificateFile /etc/ssl/certs/ SSLCertificateKeyFile /etc/ssl/private/ /VirtualHost Main Website: VirtualHost *:8080 ServerName ServerAlias RewriteEngine On DocumentRoot /var/www/ AllowEncodedSlashes NoDecode ErrorLog /var/log/apache2/ /VirtualHost VirtualHost *:443 RewriteEngine on ServerName ServerAlias SSLEngine on SSLCertificateFile "/etc/ssl/example/2022/" SSLCertificateKeyFile "/etc/ssl/example/2022/" SSLCertificateChainFile "/etc/ssl/example/2022/" # varnish proxy ProxyPreserveHost On ProxyPass / ProxyPassReverse
...com/A/AB/ABC/ABCD/ and would receive A/AB/ABC/ABCD/index.html. But now I want to be able to enter http://localhost/A/AB/ABC/ABCD/ and I want the server to give the information I entered to index.php. So again would receive A/AB/ABC/ABCD/ but now from localhost. I have configured everything but it is not working. My .htaccess file contains: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ $1 [QSA,L] /etc/apache2/ contains: <Directory /var/www> Options FollowSymLinks AllowOverride All Require all granted </Directory> <Directory /var/www/html> Options FollowSymLinks AllowOverride All Require all granted </Directory> I also did: # a2enmod rewrite # service apache2 restart
Need small assistance with htaccess. I have the following in htaccess rules but still 2 of the URLs are not redirecting while there is no file and no directory with the same names RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ / [NC,L,QSA] This should ideally take only a few minutes if you know what the issue can be.
...Python Websockets server that functions perfectly WITHOUT ssl (ws://) but doesn't connect WITH ssl (wss://). It seems to us the easiest route is to modify our Apache config and create a proxy so that all connections made to wss:// are securely proxied to our ws:// server that we are able to launch successfully. Here is what our current modifications to our Apache config looks like: -- RewriteEngine On RewriteOptions Inherit ProxyRequests Off ProxyPreserveHost on RewriteCond %{HTTP:Upgrade} "websocket" [NC] RewriteCond %{HTTP:Connection} "Upgrade" [NC] RewriteRule .* "ws://%{REQUEST_URI}" [P] <IfModule mod_proxy.c> ProxyPass "/wss/" "ws://" ProxyPassReverse "/wss/" "ws://" </IfModul...
I'm trying to get the htaccess to remove .php from file and also allow cakephp redirect, please fix my .htacces to allow for this RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /$1 [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $ [NC,L]
Hi Ray, you did some great work for me before. This is a trivial. I want my htaccess file to redirect anyone looking for a html page to be redirected to a php page. For example, if you were trying to reach , you would end up on Currently I've written this and it isn't working... ErrorDocument 404 / RewriteOptions inherit RewriteEngine on RewriteCond $ !-f RewriteCond $ -f RewriteRule ^(.*).html$ $
Someone did fix my website for 2 weeks ago and updated everything and now it looks like this Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . [L] Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . [L] Warning: Cannot modify header information - headers already sent by (output started at /customers/6/d/e/:1) in /customers/6/d/e/
Website is stuck giving bad write errors, continually being infected by hack Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . [L] Order allow,deny Deny from all Order allow,deny Allow from all RewriteEngine On RewriteBase / RewriteRule ^$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . [L]
...combined RewriteEngine On RewriteCond %{HTTP:Connection} Upgrade [NC] RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteRule "^(/?.*)$" ws://localhost:8000/graphql [P,L] ProxyPass / http://localhost:8000/ #RewriteCond %{SERVER_NAME} = #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] SSLCertificateFile /etc/letsencrypt/live/ ServerAlias SSLCertificateKeyFile /etc/letsencrypt/live/ Include /etc/letsencrypt/ </VirtualHost> <VirtualHost *:443> ServerName ErrorLog ${APACHE_LOG_DIR}/ CustomLog ${APACHE_LOG_DIR}/ combined RewriteEngine On
hi, i want to modify my .htaccess file to 301 my non-www traffic to my www. I have been using this code RewriteEngine On RewriteCond %{HTTP_HOST} !^$ [NC] RewriteRule ^(.*)$ $1 [L,R=301] But when i do that, my wordpress site in a subdirectory redirects to the main page and does not allow my subscribers to log in. The project is quick and simple, re-write my htaccess to allow for non-www to www redirect without messing with my other Wordpress on the same domain.
...against the URL "" I have tried this htaccess rule RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/myapp.php$ RewriteCond %{QUERY_STRING} ^p=11 RewriteRule ^(.*)$ [QSD,R=301,L] it redirect to new URL but server says page not found on this server with 404 error. Can you please help me to rewrite the rule so server can serve the page "" against the URL "" My current htaccess is as follows <IfModule mod_headers.c> Header always append X-Frame-Options ALLOWALL </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301
****RewriteEngine - Homepage - HTACESS ****. WRONG URL PAGE IS NOT SHOULD
Greetings everyone, i have a wordpress website that was on Apache and it was working fine but now i converted it to Nginx and its giving me 404 not found on Posts only, the homepage is working fine but not the posts i...193, server: , request: "GET /series/american-dad/ HTTP/1.1", host: "", referrer: "" and here is the only rule that was in .htaccess #This Apache config file was created by Duplicator Installer on 2021-04-10 02:35:54. #The original can be found in archived file with the name .htaccess__[HASH] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L] </IfModule> # END WordPress
.../ RewriteOptions inherit RewriteEngine on RewriteRule ^$ RewriteEngine on RewriteRule ^port-stephens/quad-bike/$ port-stephens/quad-bike/ RewriteEngine on RewriteRule ^port-stephens/quad-bike/$ port-stephens/quad-bike/ RewriteEngine on RewriteRule ^port-stephens/quad-bike/$ port-stephens/quad-bike/ RewriteEngine on RewriteRule ^port-stephens/quad-bike/$ port-stephens/quad-bike/ RewriteEngine on RewriteRule ^nelson-bay/quad-bike/$ nelson-bay/quad-bike/ RewriteEngine on RewriteRule ^nelson-bay/quad-bi
Code for redirect is below: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} site.eu$ [OR] RewriteCond %{HTTP_HOST} ^www.site.eu$ RewriteRule (.*)$ $1 [R=301,L] </IfModule> We need everything after " " to be excluded from the redirect.
...ServerName ServerAlias ErrorLog /var/log/apache2/ CustomLog /var/log/apache2/ common RewriteEngine On RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{SERVER_NAME} = [OR] RewriteCond %{SERVER_NAME} = RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:80> ProxyPreserveHost On ProxyPass / ProxyPassReverse / ServerName ServerAlias ErrorLog /var/log/apache2/ CustomLog /var/log/apache2/ common RewriteEngine On RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{SERVER_NAME} = [OR] RewriteCond %{SERVER_NAME} =
I need an htaccess to: 1) rewrite to (and keep querystring data) 2) if querystring includes "page=one", show 3) if querystring includes "page=two", show *The logos are in a /pics/ folder Here's what I have (not working): RewriteEngine On RewriteBase / RewriteRule ^index.html [QSA] RewriteCond %{QUERY_STRING} page=one RewriteRule ^pics/logo.png pics/logo-one.png RewriteCond %{QUERY_STRING} page=two RewriteRule ^pics/logo.png pics/logo-two.png HERE IS SOME MORE INFO: #This WORKS: #RewriteRule ^pics/logo.png$ pics/logo-one.png #This WORKS: #RewriteCond %{QUERY_STRING} page=one #RewriteRule ^index.html$ index.php #This WORKS: #RewriteCond %{REQUEST_URI} ^/$ #RewriteRule ^index.html$ index.php #This DOES NOT
whm have problem and i want someone can fix it my site give me this error and i think cpanel have problem RewriteEngine On # Handle Front Controller... RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ [QSA,L] # Disable Directory Listing For Security Options -Indexes # Caching For Static Files To Make Bandwidth Lower <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-...
Hi read carefully before bid, please I have a centos apache server with Nginx there have installed Plesk panel i have a web app in sails node js, when i run it run on 1337 port, i have to operate http://myip:1337 i have created .htaccess file with the below code RewriteEngine On RewriteRule ^$ [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1 [P,L] so when i open domain it opens a web app which is running http://myip:1337 its a backend of react native app there have a chat/message function in-app which wok on web socket but its not working on apache when i remove the tick from "Proxy mode Nginx proxies requests to Apache. Turn off to stop using Apache." then i have to open the domain as
Hi read carefully before bid, please I have a centos apache server with Nginx there have installed Plesk panel i have a web app in sails node js, when i run it run on 1337 port, i have to operate http://myip:1337 i have created .htaccess file with the below code RewriteEngine On RewriteRule ^$ [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1 [P,L] so when i open domain it opens a web app which is running http://myip:1337 its a backend of react native app there have a chat/message function in-app which wok on web socket but its not working on apache when i remove the tick from "Proxy mode Nginx proxies requests to Apache. Turn off to stop using Apache." then i have to open the domain as
Hi read carefully before bid, please I have a centos apache server with Nginx there have installed Plesk panel i have a web app in sails node js, when i run it run on 1337 port, i have to operate http://myip:1337 i have created .htaccess file with the below code RewriteEngine On RewriteRule ^$ [P,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1 [P,L] so when i open domain it opens a web app which is running http://myip:1337 its a backend of react native app there have a chat/message function in-app which wok on web socket but its not working on apache when i remove the tick from "Proxy mode Nginx proxies requests to Apache. Turn off to stop using Apache." then i have to open the domain as
I need to create a script that should read all the sites inside "home" folder of a server with WHM and: 1) if there is not a .htaccess file inside public_html it should create ir with this code: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> 2) if the .htaccess exists ir should add this code at the top Thanks, Francisco
This is probably something really simple... Here's my .htaccess file: *** Options -Indexes +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Redirect 301 / RewriteRule ^browse/([0-9]+)/?$ $1 RewriteRule ^search/([_A-Za-z0-9-]+)/([0-9]+)/?$ $1&page=$2 RewriteCond %{THE_REQUEST} ^([a-zA-Z0-9-]+) /([a-zA-Z0-9-]+).php HTTP/ RewriteRule ^([a-zA-Z0-9-]+).php $1 [L,QSA] RewriteRule ^([a-zA-Z0-9-]+)/?$ $1 [L,QSA] *** Here's what happens if I visit the url I am trying to redirect: I get a 404 not found and this is the url:
Here the htaccess code. Using some auto convert plataforms (online) the web site give some redirections. RewriteEngine On Options -Indexes <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} (.+)/$ RewriteRule ^ %1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $ RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).php [NC] RewriteRule ^ %1 [R,L] RewriteRule ^([0-9a-zA-Z-_-]+)$ $1 RewriteCond %{HTTP_HOST} !=localhost RewriteCond %{HTTP_HOST} !^www. RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] #Now, rewrite to HTTPS if www present: RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !=local...
This is probably something really simple... Here's my .htaccess file: *** Options -Indexes +FollowSymLinks -MultiViews RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Redirect 301 / RewriteRule ^browse/([0-9]+)/?$ $1 RewriteRule ^search/([_A-Za-z0-9-]+)/([0-9]+)/?$ $1&page=$2 RewriteCond %{THE_REQUEST} ^([a-zA-Z0-9-]+) /([a-zA-Z0-9-]+).php HTTP/ RewriteRule ^([a-zA-Z0-9-]+).php $1 [L,QSA] RewriteRule ^([a-zA-Z0-9-]+)/?$ $1 [L,QSA] *** Here's what happens if I visit the url I am trying to redirect: I get a 404 not found and this is the url:
Hello, I added a domain to CWP on Centos 7. The HTACCESS file is being overwritten whenever I visit Then when it's overwritten with the lines below. ----------------- <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^.*[-](d+)/(.*)/$ scripts/index.php?id=$1&%{QUERY_STRING} [L] RewriteRule ^.*i/(.*)/$ scripts/index.php?cat=$1&%{QUERY_STRING} [L] </IfModule> ----------------- I get this error when I visit the domain after the lines above are added by the system automatically: ----------------- Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. ----------------- I don't use wordpress. Please tell me what you did to fix this if you s...
Need to have this edited to direct all traffic to the non-www site url while making sure https: is used in all cases. <IfModule mod_rewrite.c> Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_USER_AGENT} ^(.+)$ RewriteCond %{SERVER_NAME} ^patrickmullen.com$ [OR] RewriteCond %{SERVER_NAME} ^www.patrickmullen.com$ RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] Header add Strict-Transport-Security "max-age=300" </IfModule>
My site is being slowed down by an apparent 301 redirect for HTTP to HTTPS - I'd like this rectified and believe that adding the following code to my HTACCESS will resolve this. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ $1 [R,L] Essentially this project is to assist me with increasing my score on Pingdom around URL Redirects - currently a C - 80
...need some help with the correct php code for to handle going from www to non www. Also, my site has an htaccess file so I need to rewrite the file without breaking my site. I don't know what the current file is doing. Current HTAccess is: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L] </IfModule> Found blog suggesting something like... RewriteEngine On RewriteCond %{HTTPS_HOST} ^ [NC] RewriteRule ^(.*)$ $1 [L,R=301] I'm looking for the correct text to copy then paste into my htacess file and have it work. I think this is a super simple project for someone that knows what they are doing. Once
...Wordpress I want to set permalinks to custom permalinks, however the change isn't applied for some reason. After saving changes I'd try to create a new post but the permalink stays something like "". So the change to custom permalinks is never applied. My .htaccess file seems to be working fine and has the following rewrite rules: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L] </IfModule> # END WordPress According to all forums and sites I've visited to solve this problem, everything is correct now and it should work but I just can't get it to work. I just need someone to guide me so I can...
I want to migrate my wordpre...to Nginx translators are not much help. We want the rule to be translated and we will want to verify that the rule works well on the server. Below is the rule that needs to be translated. (please note that the plugin provider told us that the rewrite rule is implemented in a .htaccess file inside the folder /wp-content/uploads/uncanny-snc/, NOT at the root level.) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase { $base } RewriteRule ^index.php$ - [L] RewriteRule ^(?:|(?:/|))([0-9]{1,})((?:.*(?:/|))|.*.(?:(?:html|htm)(?:|.*)))$ { $base }/$1&tincanny_file_path=$2 [QSA,L] </IfModule> where { $base } is $slashed_home = trailingslashit( get_option( 'home' ) ); $base = parse_url( $slashed_home, PHP_URL_P...
I need someone to provide me with the correct .htaccess code to redirect all my Google indexed url's to https://www. The majority are indexed with the 'http://' prefix. I am currently using the following code without success: ## Redirects all http:// requests to the same page, but with https://www. RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^mydomain.net$ [OR] RewriteCond %{HTTP_HOST} ^www.mydomain.net$ RewriteRule .* %{REQUEST_URI} [R=301,L]
...outputs it. User Browser url using IP eg. Proxy call site from real browser using eg. IP - Run using php 7.x - Run using apache 2.4 using linux - Use curl or something public available - Allow login to wordpress backend - Add custom header like (meta powered by xxx) What i have .htaccess (redirect all calls to ) RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /$1 [NC,L,QSA] //get url from browser $url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; //tell curl a different ip to use curl_setopt($ch, CURLOPT_RESOLVE, array($p_Hostname . ":80:" . $p_IP,
...But I have made an alternative .php to which I want a couple of pages to go. So for example: Should keep going to But should go to and should go to For reference, see below my current .htaccess contents RewriteEngine on RewriteBase / RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L] #RewriteCond
This is the content of a .htaccess apache that need to be converted into NGINX - - - Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.(.+) [NC] RewriteRule ^(.*) http://%1/$1 [R=301,NE,L] RewriteCond %{ENV:HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteEngine on AddDefaultCharset "UTF-8" RewriteRule ^index/?$ [QSA] RewriteRule ^page/([^/.]+)/?$ $1 [QSA] RewriteRule ^AAAAAA/?$ [QSA] RewriteRule ^BBBBBBB/?$ [QSA] RewriteRule ^JOBS/?$ [QSA] RewriteRule ^advert-form/?$ [QSA] RewriteRule ^contact/?$ [QSA] RewriteRule ^AAAAAA/([^/.]+)/?$ $1 [QSA] RewriteRule ^profile/([^/.]+).html/?$ $1 [QSA] RewriteRule
I have this existing Wordpress .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #RewriteRule ^lang/(.*) /?lang=$1 RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L] </IfModule> # END WordPress Now I would like to transform any URLs that have a '/lang-'. Example: --> Should redirect internally (not fur browser to)
Hi - I have recently completed an HTML website for a client. The client has installed an SSL certificate on the domain and I have added a rewrite rule to the .htaccess file. Despite this the site will not load over HTTPS and I keep getting an error message "too many redirects occurred". This is the code I added to .htaccess file: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] I need help to sort this problem out please. DO NOT BID ON THIS IF YOU ARE NOT CERTAIN THAT YOU CAN RESOLVE THIS ISSUE!
i have already a httacces made need some improvement -remove trailing / (it now only working on homepage ) -improve the httacces file seo wise RewriteEngine on ErrorDocument 400 "Ooops - Bad request! ErrorDocument 401 "Speak friend and enter ErrorDocument 403 "Strictly fabidden.. ErrorDocument 404 /errors/ ErrorDocument 500 "Server gone wild.. # Redirect to domain without www. RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule .* http://%1%{REQUEST_URI} [R=301,L] # Same for HTTPS: RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule .* https://%1%{REQUEST_URI} [R=301,L] # Remove trailing slash from non-filepath urls RewriteCond %{REQUEST_URI} /(.+)/$ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQU...
I installed a fresh Wordpress site with multisite enabled on AWS ec2 ubuntu instance. I followed all the instructions during the setup. My .htaccess looks like below # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteRule ^index.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*.php)$ $1 [L] RewriteRule . [L] </IfModule> # END WordPress and wp-config looks like below define( 'WP_ALLOW_MULTISITE', true ); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define(...
...rows in set (0.00 sec) For the Home page I leave the alias blank (currently) and set home=1. To keep search engines happy I want to have and redirect to https://www.site.com. I have a working redirect for http to https. Here is the .htaccess curently in use: ------------------------------------ <IfModule mod_rewrite.c> # In the beginning ... RewriteEngine on RewriteBase /demo/ # if subfolder, otherwise: RewriteBase / Options +FollowSymlinks # Redirect http to https RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ $1 [R,L] # to redirect to / RewriteCond %{THE_REQUEST} ^.*/index.php # FAIL IF IN SUBFOLDER RewriteRule ^(.*)$ /$1 [R=301,L] # Not found redirect ErrorDocument 404 /demo
I have a Apache Webser and want to deliver WebP over a Script. the script generates from .png and .jpg a .webP if needet. i have startet to write a rewrite rool who does not work: 1. Checking if br...and .jpg a .webP if needet. i have startet to write a rewrite rool who does not work: 1. Checking if browser supports WebP 2. Check if File is jpg oder png 3. rewrite all Images in 2 subfolders (Does not Work) Example: /webptest/ --> /webp/ Example: /webptest2/ --> /webp/ ### WEBP RewriteEngine On Options +FollowSymlinks RewriteCond %{HTTP_ACCEPT} image/webp RewriteCond %{REQUEST_URI} (?i)(.*)(.jpe?g|.png)$ RewriteRule ^webptest/(.*).jpg?$ /webp/$ [QSA]
I have a subdomain , which has an A rec...sending some system information and page content to Google. Privacy Policy This server could not prove that it is ; its security certificate is from recrutodemo.se. This may be caused by a misconfiguration or an attacker intercepting your connection. Proceed to (unsafe) Is there a way to get around this? This is the htaccess for RewriteEngine On RewriteCond %{HTTP_HOST} ^(?:info|career|karriar).?([a-z0-9-]+?.?[a-z0-9]+) [NC] RewriteRule ^ %1/section%{REQUEST_URI}/host/%{HTTP_HOST} [P,L] If I force the browser to accept the SSL exception then the address is displayed as it should and the redirect works correctly.
I have a subdomain , which has an A r...sending some system information and page content to Google. Privacy Policy This server could not prove that it is ; its security certificate is from recrutodemo.se. This may be caused by a misconfiguration or an attacker intercepting your connection. Proceed to (unsafe) Is there a way to get around this? This is the htaccess for RewriteEngine On RewriteCond %{HTTP_HOST} ^(?:info|career|karriar).?([a-z0-9-]+?.?[a-z0-9]+) [NC] RewriteRule ^ %1/section%{REQUEST_URI}/host/%{HTTP_HOST} [P,L] If I force the browser to accept the SSL exception then the address is displayed as it should and the redirect works correctly.
I need some custom work to my WordPress htaccess Rules using RewriteEngine etc.
Hello. I need to know the proper way to write the following url: to be included in RewriteCond %{HTTP_REFERER} Use Case: I need ONLY users who are referred from the above URL to to be re...to write the following url: to be included in RewriteCond %{HTTP_REFERER} Use Case: I need ONLY users who are referred from the above URL to to be redirected to I have proof of concept when referring by domain/subdomain but require assistance for a specific url. RewriteEngine On RewriteCond %{HTTP_REFERER} example.com [NC] RewriteRule ^cv-services/?$ $1/cv-services-acca$2 [R=301,L]