I am hosting a Django app on managed server with passenger_wsgi file. Let assume app main url is 'www.mysite.com'. When i visit this it shows me the homepage. What i want is to use wildcard subdomains in the app.
Like www.user1.mysite.com , www.user2.mysite.com , www.user3.mysite.com and so on, it can be any wildcard.
I have created a wildcard subdomain from cpanel like "*.mysite.com" , also added wildcard in my django settings.py file too. But when i visit the "www.user1.mysite.com" browser says
Not Found The requested URL was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
settings.py
DEBUG = False
ALLOWED_HOSTS = ['.mysite.com','mysite.com']
Any kind of help would be great.
Thanks..!!
Related
I am new to this topic. I have deployed my app to Azure (following the tutorial from Autodesk). When I try to press to the login to BIM360 is return an error 500 (internal Server Error). I have changed the FORGE_CALLBACK_URL = "htttp://forgeSample1234.azurewebsite.net/api/forge/callback/oauth"
The code has no problem when in localhost.
Does anyone has the same problem?
Please note that when updating the callback URL, you actually have to change it in two places:
in your code (that's typically the FORGE_CALLBACK_URL)
in your Forge app page in https://forge.autodesk.com/myapps
And of course, the URL has to match exactly in both places.
Also, it looks like there might be a typo in your URL: you say htttp instead of http, and I'm also wondering if you shouldn't be using https?
I have an Express/NodeJS app running on Google App Engine, for which I have the URL in the format of:
project-name.appspot.com, where project-name: My google project name
Now, for site verification, I am using HTML File Upload method.
I am serving the html verification file provided by google as follows:
res.sendFile(path.join(__dirname, path_to_html_file))
Now, when I enter the url: https://project-name.appspot.com/, I can view the file.
Also, the file has the same name as provided by Google.
However, when I click Verify in Webmaster, it still fails with error message "File not Found"
Can anyone point what I might be doing incorrectly ?
You need to serve this file from the /xxxxx.html url, not the root url.
In other words, it needs to be accessed from https://project-name.appspot.com/xxxxxxxx.html
Think about it... This file must stay up for as long as you want to be verified, so it doesn't make sense to be shown at the root url.
Also, make sure there are no redirects in serving this file.
using iis rewrite is great, but how does the module interpret a hashsign in the url.
This works:
/fromurl;/anotherurl
But this does not:
/fromurl#;/anotherurl
How do I "output excape" a hashsignin the from url.
I'm pretty sure the hashmark isn't sent to the server, so the rewrite module can't react to it.
This means that /fromurl and /fromurl# would result in the same url (as seen by the server)
I've a problem with an htaccess redirect.
In my Google Search Console I've found this link
http://www.example.com/index.php?id=10&L=2%27%2520AnD%25201%253D1--
that return error 403.
"index.php" doesn't exists in my website and I want write a rule that redirect this link to homepage.
The problem (in my opinion) it's that in this url there is a symbol "=" without an "*&var*" before.
The decoded version of the url is
http://www.example.com/index.php?id=10&L=2' AnD 1=1--
If I remove (manually) the symbol "=" (or it's encoded version "*%253D*") my htaccess woks perfectly.
Thanks
Lorenzo
**ADD NEW DETAILS**
OK, for url that has 1=1 it's probably sql-injection
But i've found also link as
http://www.example.com/index.php?eID=tx_cms_showpic&file=uploads%252Fpics%252FIMG_5213.jpg&width=800m&height=600m&bodyTag=%253Cbody%2520style%253D%2522margin%253A0%253B%2520background%253A%2523fff%253B%2522%253E&wrap=%253Ca%2520href%253D%2522javascript%253Aclose()%253B%2522%253E%2520%257C%2520%253C%252Fa%253E&md5=edc3c713d0e239f8a7e786cf52f29774
that decoded is
http://www.garnicristin.com/index.php?eID=tx_cms_showpic&file=uploads/pics/IMG_5213.jpg&width=800m&height=600m&bodyTag=&wrap= | &md5=edc3c713d0e239f8a7e786cf52f29774
I'm not shure that is older version of website (I not made older version) and the problem is the same, symbol = in url
AnD 1=1-
This looks like a lame attempt at a SQL injection attack. The fact that your server returned a 403 ("Forbidden") error might mean that a security module in your web server detected the attempt, and served the error.
In that case, I would not add a rule trying to cater to these requests.
Im trying to combine several tutorials about Codeigniter and bootstrap and understand per codes so i can integrate it in my project. What i am trying to do right now is create a login form using the two framework.
And i setup my View according to the turotial included in Codeigniter 'user_guide/tutorial/static_pages.html' which my landing page is named as 'home.php' is inside the folder 'pages' and header.php, and footer.php is inside the 'templates' folder. I created also a controller: Page.php.
I also use .htaccess to hide 'index.php'. Now i follow this tutorial how to create a login page:
http://learnjquerybootstrap.blogspot.com/2015/01/login-session-using-codeigniter-and-bootstrap.html?m=1
-the only difference is this since i use htaccess:
<?php echo form_open(clogin/index); ?>
But when I try to submit the page i receive a: 404 page not found.
My navbar links are working fine. I understand that the codeigniter works like this:
http://localhost/myfolder/index.php/class/function/
so when i submit my form the url that show up is:
http://localhost/myfolder/clogin/index
and gives me: 404 page not found.
Question:
What is wrong with it?
is there something wrong with the tutorial that i am using? i check other tutorials and the controller structure is just the same, like on this link:
http://www.kodingmadesimple.com/2014/08/how-to-create-login-form-codeigniter-mysql-twitter-bootstrap.html
do i need to include clogin.php in route.php?
or is it about the htaccess? my
uri_protocol
is configured as
'REQUEST_URI'
in config.php. i tried other options but still the same.
Don't need include to route.
I recommented ready auth library.
If you use DevTools in your browser maybe "Network" tab of devtools can help you to why you get 404 error.
i already firgured it out.The mistake was in the route.php, since i tried to combine two examples.. i realized that the wildcard route that i included from the Codeigniter user guide will not work with the Clogin.php.
Since it was set as
$route['(:any)']='pages/view/$1';
So the url works as
http://localhost/myfolder/pages/view/clogin
instead of
http://localhost/myfolder/clogin.
I removed it and now it is working.