Changing port of xampp caused project url leads to 404 - codeigniter

Port 80 is occupied by system. SO I changed the default port(80) of xampp apache server to port 81. It is working and only thing changes in my url is, I have to type port number in url like this to make it work
localhost:81/phpmyadmin //example
But When I transfer my one codeigniter project to my pc in xampp then all link tag urls started to show as 404. My css wasn't getting picked. Here is the url in link tag were like
<link rel="stylesheet" href="css/style.css">
When I inspect and rightclick on href in link tag and click on option Open in new tab then in new tab, following url open
localhost/project_name/css/style.css //PORT number is missing
But this should have open like this
localhost:81/project_name/css/style.css
Why my codeigniter project link is not picking localhost:81 but instead it is picking only localhost. Any idea?

If you have changed the port number then you need to change the base_url in config.php. In your case it should be.
localhost:81/project_name/

Related

how to access website stored on xammp via static public ip

I have designed a website. Almost all settings are done such as port forwarding in router etc. The website is also accessed on any computer through internet using static public ip but displays text only without any css effects, images etc.
If the CSS styles, images, JS files, etc. are not displayed outside the localhost (from your IP address), it must be because when you specify the URL or location of those files, you give an absolute URL which works just for localhost.
For example, if you have
htdocs/
index.html
css/
stylesheet.css
img/
logo.jpeg
slider-1.png
slider-2.png
slider-3.png
This will work just in localhost (the computer where xampp is installed):
<link rel="stylesheet" href="http://localhost/css/stylesheet.css">
<img src="http://localhost/img/logo.jpeg">
ETC.
If you want it to work also outside your computer you should use relative paths:
<link rel="stylesheet" href="/css/stylesheet.css">
<img src="/img/logo.jpeg">
ETC.
This is because the HTML code is executed in the client side (in the person who visits your page's computer) so they can't access your files through localhost...
I hope this helps you, I was going to ask you which type of URLs do you use through the comments before answering but I can't add any comments because of my reputation :v

https issue - after clicking hyper link

When i click a link in one page called a.html, the target link(b.html) will be have to be opened, which is an secure site SSL (https).
After i clicked the a.html site, the b.html site not opened instead it was saying the site can't be reached.
What issue i saw was the https:// is removed, i don't know why it
is removed.
Does any have any idea why this issue is occurring....
a.html Testing....
b.html https://test.abc.com/b.html - not opening because (https://) is removed.
I have tested from my local and is working. Just have a look at this small block of code that only has link to the google home page.
a.html
<html>
<head></head>
<body>
Google link from non https html
</body>
</html>
It should work if you have a https site or page working from anywhere.
Edit:
In the case of not working there should be some reasons like :
Some codes might be removing your https links like: jQuery codes.
There might be some redirection codes like htaccess.
Or there might be some scenarios like that.

CSS not Loading in Magento

I'm having a problem with my magento, CSS is not loading.. and when I take a look on its source. There's a problem with my path..
link rel="stylesheet" type="text/css" href="C:\Program Files (x86)\Zend\Apache2\htdocs\mycommerce_comhttp://mycommerce.com/skin/frontend/base/default/css/style.css" media="all" /
C:\Program Files (x86)\Zend\Apache2\htdocs\mycommerce_com is not supposedly in the path.
the correct path must only: http://mycommerce.com/skin/frontend/base/default/css/style.css
Whats the solution for this? I already did all the solution given by google.
Still no luck.
can you check under System => Configuration => Web, under both Secured and Unsecured tab the value of skin folder, if you website is running correctly then I assume you have your base URL correct. If so then the value for media and skin should just be:
{{secure_base_url}}skin/
{{unsecure_base_url}}skin/
If you go to the controlcentre
System => Configuration => Web
The main point to watch out for is
i. Url options -> Add store code to Urls should be 'No'
ii. Unsecure -> Base Url should point to your own domain e.g http://mycommerce.com/
iii. Secure -> Base Url should point to your own domain e.g http://mycommerce.com/
also you should have
{{unsecure_base_url}}skin/
for your Base Skin

Calling https version of TYPO3: content (css, js, ..) is blocked because link to http version

In Chrome I get the following error messages in the console
[blocked] The page at https://domain.com/home.html ran insecure
content from
http://domain.com/typo3temp/stylesheet_09c1ef800c.css?1345207892.
if I call https://domain.com. The user gets a page without stylesheets and images. What can I do against this?
The files are included like <script type="text/javascript" src="js/lib/jquery-1.5.1.min.js"></script> but I don't want to define the domain.
Should I completely switch to https by setting the base URL with https? Which other possibilites do I have?
I used
config {
baseURL = https://domain.com
}
and adapted all links which had a http in the beginning (otherwise the slider stopped working because Chrome didn't load the other ressources ...). Seems to work now.

Magento base url not reflecting value changed in database (missing /)

This is one of those things that on the surface of it seems very simple to resolve, but it's got me beat!
I can see from searching around that quite a few people have had this issue crop up but there seems to be no solution that I can find.
What I've done:
1. Transfered my site from the root folder into a /shop folder.
2. Changed the database entries for secure/unsecure base urls to https://www.dnabaits.com/shop/
3. Cleared out all the Cache and Tmp files.
What's happening:
The whole site is functional but no styles or scripts are being loaded because the paths in the head are missing the trailing / after shop.
So instead of getting this
mydomain.com/shop/skin/........
I'm getting mydomain.com/shopskin/........
An example Url from my page source
<link rel="stylesheet" type="text/css" href="https://www.dnabaits.com/shopskin/frontend/default/dna/css/lightbox.css" media="all" />
In your .htaccess file make sure you have this (with trailing slash):
RewriteBase /shop/
Another possibility is that your Store Configuration Scope for your Store View has a different setting. Change your Configuration Scope in Admin -> System -> Configuration -> Web and make sure your URL settings aren't customized there.

Resources