I couldnt find similar topic (maybe exists)...
Whenever my browser try to load
example.com/abc.js, instead I want to load this file actually:
mysite.com/abc.js
(p.s. I DONT OWN THOSE SITES, I WANT ONLY TO TRICK MY BROWSER TO LOAD DIFFERENTLY ONLY ONE SPECIFIC FILE.)
with htaccess redirect
Redirect http://come_from/abc.js http://send_to.com/abc.js
Related
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.
Does anyone know if Brackets Shell uses any URI except the file://...index.html format? I want to point a web service back to the shell and need to provide a valid URI with the URL. The problem is that I noticed that the URL for the index file uses basic system paths and this can change per system or user configuration.
Any way around this little problem?
Edit:
I am trying to access the Instagram API through brackets shell. In order to gain an access token to the OAuth method they use I need to redirect the user to the Instagram Login page to log in then grant access and then Instagram will redirect them back to me based on the call back or redirect url provided from me. If it was as simple as providing just the URL when the call was made I would be fine however to get a client key (which is also needed to access the api) I need to provide the correct call back URL once the key is made and since the shell seems to have no custom file path it's almost impossible to predict the file path based on each users setup on their own pc's. I hope this made sense :)
I searched the source of the brackets-shell, but couldn’t find the startup path. A quick workaround would be adding a meta-refresh to your index.html which redirects to the corresponding URL of your web service.
For example:
<meta http-equiv="refresh" content="0; url=http://example.com">
If you don’t want to select your index.html each time you start your custom shell, you should place your index.html at
Mac: Brackets.app/Contents/dev/src/index.html or Brackets.app/Contents/www/index.html
Win: dev/src/index.html or www/index.html (these folders must be in the same folder as Brackets.exe)
Linux: dev/src/index.html or www/index.html (these folders must be in the same folder as the Brackets executable)
You can get the current location through javascript using
document.location.href
this will return a string like
"file:///C:/Program%20Files%20(x86)/YourApp/www/index.html"
which you might try sending to Instagram. I'm not sure if they will accept file URI's though.
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 }}
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.
Wondering if I need to do something in my swf to be able to access the assets on a different server, meaning more than just specify the url to the asset. Will flash handle the 'go get crossdomain.xml and authenticate everything' behind the scenes or do I need to include some special code beyond simply requesting the swf file?
Will flash handle the 'go get
crossdomain.xml and authenticate
everything' behind the scenes or do I
need to include some special code
beyond simply requesting the swf file?
In the event of any cross-domain request, Flash will look for the crossdomain.xml file at the root of the domain. For example, if you are requesting an XML file from: http://mysubdomain.mydomain.com/fu/bar/
Flash will check if a crossdomain.xml file exist at: http://mysubdomin.mydomain.com/crossdomain.xml
If you ever need to load a crossdomain.xml file from a different location, you can do it via Security.loadPolicyFile . Bear in mind that the location of this crossdomain have any impact on the security access you have.
You may also want to read up on the security changes in Flash Player 10.
If you're just trying to access another swf, adding the crossdomain.xml will do all the work for you since Flash will do it for you