Change domain without 404 error code? - url

I have changed all the URLs of my website. (Domain is the same. For example: http://www.example.com/category/sample ----> http://www.example.com/Category/Sample)
Now it seems to have lots of 404 pages that are effecting my SEO.
What should I do to solve this problem? Any suggestion?
Thank you

You can proceed with changing the Context root for your website. Context roots determine the URL of any web-application.
Click here for a short article for making changes to context-roots.
The process may change based on the Server you are using.

Just create sitemap.xml file. There are many online sites available that will create free sitemap.xml file. Just you have to submit your website url and within few seconds they will generate sitemap.xml file. Download this sitemap.xml file and place it into your root directory. When crawler run through your website it will automatically update your all links and within few days you will see all updated links are present in search resulting page like google search engine.
Note: Also, dont forget to update sitemap.xml file path in robot.txt file.

Related

Contao Backend Styling / layout missing

Hi contao developer out there,
Anybody knows why the styling of the whole admin backend's missing.
I attach a screenshot, let me know if anyone knows something.
enter image description here
Looks like you have installled your Contao into a sub directory and setup your base url incorrect.
Have a look into system/config/pathconfig.php and verify the path is the same as in your browser (i.e. return ''; for an installation in the root dir and return '/some-dir'; for an installation in an subdir).
You should also check with web-developer tools as to which URLs for the Backend CSS it tries to load. Usually this already points out what in the base url is wrong.
Last thing, you might have set up some "strange" rewrite rules in your .htaccess file which may cause these problems.
Problem solved.
The fact that, the problem comes from the server configuration.
The Php process wasn't have enough permission, so it takes me some time to realise and knowing that I need to change the apache modul version to cgi/fpm mode.
This grants the php to recreate and generate the assets including js/css in asset folder. (at least from my own observation) and it works now.

Rails4 Routes public directory on different subdomain

Currently I have a static webpage and I am working on a Rails4 app to replace that page.
Lets say my current website URL is: http://www.foo.com
I have a java app that will look for updates in a specific URL: http://foo.com/updates/1.1/updateDescriptor.xml and download some files in that same directory.
Everytime I want to create a new update for my java app, I will use an FTP client and replace the xml and the other files from that directory.
I want to create a public subdomain:
http://files.foo.com and put there the updates directory.
So, my java apps will look for: http://files.foo.com/updates/1.1/updateDescriptor.xml
The problem is that every java app out there will search in the old URL.
So, how can I redirect it in rails?
I tried:
routes.rb <br/>
get '/updates/*all', to: redirect('http://files.foo.pt/updates/%{all}')
But, the URL is not well encoded:
http://foo.com/updates/1.1/updateDescriptor.xml
turns to:
http://files.foo.com/updates/1.1%2FupdateDescriptor
Which is wrong encoded, and a HTTP 404 results!
Do you guys have any idea that may help me on this?
Thanks,
Nuno
Try this get '/updates/*version/*file.*format', to: redirect('http://files.foo.pt/updates/%{version}/%{file}.%{format}')

CMS SPIP, how to updated the file inside Squelettes directory

Heloo,
I have website that built by SPIP and already online on the internet. Since my webmaster dont work anymore with us, now I try to learning CMS SPIP.
I want to edit one of the html file, located inside this directory : httpdocs/squelettes/myfile.html. Say the name of my file is myfile.html
I changed some part of the file than upload it through fileZile. When I open my browser and refresh it, the file haven't changed yet. but it's successful upload.
please advise, do we need to configure something to upload the file.
Thank you for your help
There is a simple way to refresh a page in SPIP when you have caching issues : pressing the Reprocess page button on the public site (as said by Serge) or adding ?var_mode=recalcul as a parameter of your URL.
I think the matter is in website cache. SPIP is hard caching HTML and images.
Try to clean cache via private area (under Maintenance button in SPIP 3) or press "Reprocess page" button on the front-end.
With your FTP connection go to the SPIP root directory, then find the /tmp directory open it and clear\empty the /cache directory inside it. This directory contains temporary files & cache files.

How do I link to a PDF file in Silex?

I've looked around a bit and can't seem to figure out how to link to a static file while using Silex. I've seen some similar questions/answers in regards to Symfony, but they involved YML routing files, which I don't use with Silex.
My Situation
I have some files in a /docs folder. Logged in users can upload new pdf files (so, I don't know ahead of time what all of the filenames will be; they're constantly changing).
My Intent
I need to be able to link to these PDF files, so that a click on a link somewhere will open www.myurl.com/docs/myfile.pdf.
The Problem
Due to the routing system in silex, it treats the url as a route (obviously) and throws a Page Not Found error.
Thanks in advance for any feedback!
You need to configure your web server in a way that it does not forward existing files to the front controller. The web servers section of the silex documentation has examples of such configurations for the most popular web servers.
As for the link itself, just link to the file directly, something along these lines:
{{ filename }}

How To Dynamically Route to Downloads

Basically, this is what my app does:
It sends an AJAX request
The server creates a file
The server sends back the URL of the
file location
The client-side will attempt to
create a dialog to download the file
at that location (probably using a
frame? I haven't got this far yet).
My question is, how do I dynamically route to the files I create so that they are accessible when you browse to them? If I don't add a route for them, then they will get a 404 if they try and access the directory they're in.
The files are currently stored in a folder in public.
Would the best way to deal with this make the folder somehow not require a route, so that it can be browsed to directly, and then have an index page on it so they can't view the full list of files? If so, please let me know how I can accomplish this. And on a side note, if you have an idea of how I can accomplish JS displaying the download dialog let me know.
It's Rails 3 by the way.
Thanks!
For a full private set of files: choose a place for your files outside your public directory, then configure X-SendFile support in your web server and finally use send_file in your rails application.

Resources