URL re-writing in Flipbuilder - .htaccess

I had requirement to shorten the URL so I did as:
from this(https://dittmagasin.no/resources/uploads/releases/zipfiles/kondis_06_2017/) to this(https://dittmagasin.no/kondis/utgivelser/kondis_06_2017) using
<base href="/resources/uploads/releases/zipfiles/kondis_06_2017/" />
into index.php, and writing a rule into Laravel .htaccess, i.e:
RewriteRule [a-z]/utgivelser/reis_03_2017/(.*)?$ resources/uploads/releases/zipfiles/reis_03_2017/$1 [NC,L]
Problem: Whenever I try to "Print" from this by clicking on print icon in Chrome. It pops up with "Blank Page". But it works fine in Firefox.
These pdfs were created using Flipbuilder.
Any suggestion will be appreciated. Thanks

Related

Creating Static Links Using .htaccess

I am new to .htaccess
I have created many links which open up pages based on a search result.
The link addresses are, each link has a different prid such as 3110, 3111, 3222
http://mywebsite.com/prid-3110/1500-Sq-Ft-Residential-Plot-for-Sale-In-Arya-Shine-City-Irba-Ranchi-For-Rs-9.75-Lakh
I want this link to point to (ignore everything after the second slash)
http://mywebsite.com/prid-3110/
My Current .htaccess rule is
RewriteRule ^prid-([0-9]+)$ views/propertyview.php?property_id=$1
The correct answer is working below
And add this the following so everything else like CSS, Images work because your browser will know from where to start looking for files.
<head> <base href="../"> </head>
You can use:
RewriteRule ^prid-(\d+)(?:/|$) views/propertyview.php?property_id=$1 [NC,L]
With (?:/|$) you avoid prid-3110blabla, but you can use only:
RewriteRule ^prid-(\d+) views/propertyview.php?property_id=$1 [NC,L]
without this test.

Website Has SSL Issue, Shows in IE and Safari but Not Chrome or irefox

I have a website a company I freelance for took over and since it was transferred their site went down. The website is www.baseline-enserv.com.
For me, it shows up fine in Internet Explorer and safari but in Chrome and Firefox it's redirecting it to an https:// of which it is not.
I have checked the htaccess and it had a https redirect in there which i've removed. I did a database search and didn't find any URL's with https and I checked the wordpress settings for the site itself and it's set to http://.
I can't figure out where else to look to find out what's causing it to redirect. I even checked to see if there was a DNS setting that somehow did it but there is none.
It should NOT be redirecting to https but should be http only.
I also ran a test on geopeeker.com and to my surprise it checks out in all locations, but it may be using the same browser that i'm using that shows up fine.
I also have an account for browserstack so I have tested it on there and it checked out and loaded fine in Firefox 47 and 45, Windows 8 as well as Chrome 50 and 51.
It seems as if it's a caching issue but when I clear my cache and cookies it still doesn't work.
Thanks!
This is all that resides in the htaccess by the way.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /site/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /site/index.php [L]
</IfModule>
# END WordPress
They had the site installed into a site folder in the root.
It is definitely a cache mechanise problem. Your site used to have a Permeant Redirect (301) rule in .htaccess. And that is being cached by the browser.
In Chrome, I don't think that "Clear browsing data" will be helpful in this case. There are some workarounds, I think that might help:
For Chrome:
Try to use incognito mode for testing
Try to open the inspector, and go to Settings (three dots on the right side) => check Disable cache (while DevTools is open), and reload the page.
For Firefox:
Private tab will work fine
Or you manually check cache file to make sure by accessing "about:cache"
If none of above work, try to put some random query string after the url for testing. For example:
www.baseline-enserv.com/?test
If it doesn't work too, I think you have to try it out on other machine/device. But after all, that cache will not last for long. And it will soon be cleaned. So, if it is no urgent, just sit back and get some coffee. And get back to it later.
Hope that helps!

Redirect the URL using .htaccess

I have a page showing the products with the hyperlink for it as
www.domainname.com/productname
now my client needs to add store and needs the URL to show as
www.domainname.com/store/productname
I have done it via code and now when I click on it for a detail page, its still redirecting to
www.domainname.com/productname
but need to be
www.domainname.com/store/productname
tried with this: RewriteRule ^store/?$ domina.com/?$ [NC,L] in .htaccess file, not sure whether I'm on page
Can any one tell me how to do it via .htaccess file.
Thanks in advance.
Try this :
RewriteRule ^store/(.*)/?$ http://domain.com/store/$1 [R,L,NC]

Htaccess. Redirect from non-friendly Url

I need friendly URL only for some pages on my website, I added this code to htaccess
RewriteEngine On
RewriteRule languages/english-online.html languages/english.php
And now when I open in browser http://mydomain.com/languages/english-online.html I see the content of page "languages/english.php". It's OK
But I also want to do: if somebody tries to enter to http://mydomain.com/languages/english.php, he will be redirected to http://mydomain.com/languages/english-online.html
I've tried everything, I get or 500 error or nothing happends.
Please help
Did you try:
Redirect /languages/english.php http://mydomain.com/languages/english-online.html
Similar code worked for files on my own website.

.htaccess RewriteBase

In my .htaccess folder I'm using RewriteRule to forward music.php?artist=name to music/name. My problem is, if you click another link, instead of going to site.com/music/otherartist, it goes to site.com/music/name/otherartist (you're still stuck in the "music/name" directory). I've tried adding
RewriteBase /
and I get the error "Object not found." I'm sure the solution to this is really simple, but I haven't figured it out yet. :/
You need to change your links to be absolute URLs or add a relative URI base to the header of your pages:
<base href="/" />

Resources