Does anyone know where the settings related to Extensionless URLs are found in Sitefinity 4.x and above? I'm looking at 'Advanced Settings' in the backend and I can't find them.
A website that I recently upgraded from Sitefinity 4.4 to 5.3 is suddenly showing .aspx extensions for some pages and a 404 error for others. I can't add content to newly created pages as it's showing the 404 when I try to add some content to the page draft.
Sitefinity by default is extensionless and given that some pages have .aspx and some don't, have you checked its not due to some faulty url-rewrite rules that may have been added to the web.config ?
Just to be on the safe side, you could check your PagesConfig.config file (located in /App_Data/Sitefinity/Configuration) that it looks like the following:
<?xml version="1.0" encoding="utf-8"?>
<pagesConfig
xmlns:config="urn:telerik:sitefinity:configuration"
xmlns:type="urn:telerik:sitefinity:configuration:type"
config:version="5.3.3900.0"
defaultFrontendTemplateId="00000000-0000-0000-0000-000000000000"
defaultBackendTemplateId="0000000-0000-0000-0000-000000000000"
enableBrowseAndEdit="False"
/>
(Naturally the 0000000-0000-0000-0000-000000000000 will be actual valid guids on your end)
Further more, you can swap your web.config out for one that comes out of the box to verify.
If some pages due to errors have been given extensions, you can simply remove them by using a snippet like this one from #selaromdotnet.
Jochem
Related
After an installing a new SSL certificate and changing the PHP version from 5.x to 7.1.28 product images are not shown in the frontend anymore, Chrome dev tools show a 404 error for the image files.
They are visible in the backend under product catalog.
It looks like if the image directory is missing, i.e. something like /home-default/ because in the HTML code the image file is supposed to be directly on the document root directory, which obviously is wrong.
When I switch off "Friendly URL" the images are shown.
What I tried so far:
Deleted .htaccess, switched Friendly URL to on to regenerate the .htaccess
Emptied cache and regenerated the image thumbnails
Switched back to PHP 5.4
Added AllowOverride All to the vhost config
Nothing helps. On the server is another PrestaShop installation, running same PrestaShop version 1.6.18 also under PHP 7.1.28, there the "Friendly URL" works fine.
I must say I have no clue where to look after this problem.
After spending some time with #Harry, debugging his configuration, we found the solution and I'm sure this will help many others.
#Harry was using a combo with Nginx + Apache.
We checked his PrestaShop .htaccess file and made sure RewriteEngine was on and triggered properly (e.g. the pages were properly rewrited, only the images were not) - everything was OK.
We tried to write ourselves a basic RewriteRule to redirect a .jpg and it did not work, showing an Nginx 404 page.
We came to the conclusion Nginx was handling all the static content (JS, CSS, JPEG, etc.) and not forwarding it to Apache.
Solution
We removed this part from the Nginx configuration:
location ~ ^/(.*\.(ac3|avi|bmp|bz2|cue|dat|doc|docx|dts|eot|exe|flv|gz|htm|html|img|iso|jpeg|mkv|mp3|mp4|mpeg|mpg|ogg|ppt|pptx|qt|rar|rm|swf|tar|tgz|ttf|txt|wav|xls|xlsx|zip))$ {
try_files $uri #fallback;
}
As a general advice, I would suggest not using Apache+Nginx, PrestaShop works very well with Nginx+PHP-FPM already and you will get great performances.
If you choose this solution, don't forget to set your PrestaShop rewrite rules directly in Nginx (Example).
i am trying to figure this out for a couple of hours.
I am in the process of upgrading my joomla site from 1.5 to 2.5
I did all the work needed in an offline copy, i uploaded my new joomla site in a sub folder of root in "/v2" folder.
With my Joomla SEF links on i can't even use my template (blank page with post texts).
They work if i remove them but then i have other problems with Virtumart Search.
I already changed paths in configuration.php (cache,logs) and edited my .htaccess in my subfolder to have
"RewriteBase /v2".
The odd is that if i enable the default template is working.
I am really furstrated here, thanks in advance.
Try setting the base url in the configuration.php file
I have a website on SiteFinity 4.4. I need to make a document available on a very specific URL, i.e.
http:www.example.com/reports/the-report.pdf
If I just create a directory in the root of the site it does not work (503 error). Also when I try to use the 302Redirect.xml file to redirect the URL to the PDF it does not work either (same error). The link has already been published and has to be exactly as specified. How do I solve this?
Any help would be greatly appreciated.
Sitefinity wouldn't block a folder. Adding a physical folder and dropping that report on the proper place should function, so it probably means you'll have to check your server configuration.
Anyway, the fastest way outside Sitefinity, would be to just create a IIS rewrite rule. Make the http:/www.example.com/reports/the-report.pdf the pattern and redirect them to the url of the document from the sitefinity library.
When you upload a document to the library in sitefinity it gives you an direct url, something like /docs/defaultlibrary/document. You can verify the url by going to content >> documents and files and chose Embed link to this file. That gives you a pop-up with the url.
I am running around in circles here, I wonder if anyone can help.
I recently moved a static html website to Umbraco. It is running on a Windows plesk shared plan.
I need to put in place 301 redirects for the old content to the new but:
Umbraco won't receive requests for.html, there doesn't appear to be a way to do this.
I can't get any server side running in the .html files that the plesk supports as custom error docs.
I was going to use client side meta redirects, but wasn't sure if Google etc will read these right?
I haven't used it myself, but the Umbraco 301 Moved Permanently project looks like it does what you need.
The real trick will be piping all requests for .html files through ASP.Net. I'm not sure if this can be done with your web host. But some tips can be found here:
http://our.umbraco.org/projects/developer-tools/301-moved-permanently/feedback/7271-when-the-old-pages-are-not-from-umbraco
p.s. You are correct that a client-side redirect will not help with SEO.
you could add a rule in to your UrlRewriting.config the file sits here in the Umbraco installation... "~config/UrlRewriting.config"
The rule would strip the .html extension from the page request. And would look something like the following...
<add name="removehtml"
virtualUrl="^~/(.*).html"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/$1"
ignoreCase="true" />
You would also have to make sure that the web.config file had the following key set to true
<add key="umbracoUseDirectoryUrls" value="true"/>
This would allow you to recreate your url structure with nodes inside the umbraco cms without the html or aspx extension. If all this seems too complex you could individually add each page you want to listen for to the corresponding node in the URL Alias property (umbracoUrlAlias). Umbraco will take this and redirect to your page.
I have our basic corporate static html website installed in our web root directory and our billing software installed in /portal. I have integrated the websites to look like a single site by including the /menu.tpl smarty template file in the /portal/header.tpl file. However, if I use relative URL's, the menu sysem doesnt work as the base url for the billing script is /portal. i.e. if I create a link to faq.php in the menu.tpl and I load a page on the portal site, the link in the menu back to the faq page is now /portal/faq.php whereby if I load a page off the root site the link is just /faq.php as it should be.
The obvious answer is to just use absolute URL's, but I need the site to be portable as I have many developers who need to install and test it.
I cant find anyway to resolve this. Any ideas?
I ran into the same problem as you a while ago, and after trying a lot of dead ends, I finally ended up with the following solution:
For any URL you need to be a chamelion, i.e. change its path depending on the environment, insert a PHP function that writes out the correct URL.
If you include the PHP function from a single central file, then you can change all of the URL's in the entire site automatically, based on a setting, or some pre-detected switch such as the current domain name, etc.
Example:
<?php print_base_url_plus("/menu.php"); ?>
... where print_base_url_plus() is a function which appends the base URL onto the output.
You may find that you have to change some of the URL's to be php, so they are preprocessed by the PHP engine, or, you can alter the web settings so that standard .htm files are piped through the PHP engine, just like .php files.