Welcome Guest, Not a member yet? Register   Sign In
Redirect issue
#7

(This post was last modified: 08-02-2019, 02:44 PM by InsiteFX.)

I' am running XAMPP on Windows 10 Pro x64 1903

But I use vhost for mine.

Edit C:\xampp\apache\conf\extra\httpd-vhost.conf
Make sure that this is not remarked out with a #: NameVirtualHost *:80

Add this line to the bottom: Include "conf/extra/vhosts/*.conf"

Create a new file called: C:\xampp\apache\conf\extra\vhosts\vhosts.conf

Add this to the file and make copies of it when needed.
Edit to your own setup.

Code:
#--------------------------------------------------------------
#
#--------------------------------------------------------------

#--------------------------------------------------------------
# HTTP:
#--------------------------------------------------------------
#<VirtualHost *:80>
#    DocumentRoot "C:/xampp/htdocs/myproject/public_html"
#    ServerName .local
#    ServerAlias .local
#    <Directory "C:/xampp/htdocs/myproject/public_html">
#        Order allow,deny
#        Allow from all
#        AllowOverride All
#        Require all granted
#    </Directory>
#</VirtualHost>

#--------------------------------------------------------------
# HTTPS:
#--------------------------------------------------------------
#<VirtualHost *:443>
#    DocumentRoot "C:/xampp/htdocs/myproject/public_html"
#    ServerName .local
#    ServerAlias .local
#    SSLEngine on
#    SSLCertificateFile "conf/ssl.crt/server.crt"
#    SSLCertificateKeyFile "conf/ssl.key/server.key"
#    <Directory "C:/xampp/htdocs/myproject/public_html">
#        Options All
#        AllowOverride All
#        Require all granted
#    </Directory>
#</VirtualHost>

#--------------------------------------------------------------

Now all you have to do is add the url to the Windows hosts file.

Edit: C:\Windows\System32\drivers\etc\hosts

you can edit it with notepad with administrator rights.

Add:


Code:
127.0.0.1    localhost
::1        localhost

# Bootstrap HTML Development Server.
127.0.0.1    bs4.local

# PHP Development Servers.
127.0.0.1    test.local

#-- CI 3
#127.0.0.1    ci.local
 
Reboot your server and you are good to go.
You can now use a base_url like https://ci3.local/

The vhost file will map everything out for you.

Note: this is for testing on local machine only!
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Redirect issue - by SirTom - 07-25-2019, 11:18 PM
RE: Redirect issue - by Digital_Wolf - 07-26-2019, 01:31 AM
RE: Redirect issue - by SirTom - 07-26-2019, 03:04 AM
RE: Redirect issue - by Digital_Wolf - 07-26-2019, 12:02 PM
RE: Redirect issue - by includebeer - 08-02-2019, 10:51 AM
RE: Redirect issue - by InsiteFX - 08-02-2019, 02:11 PM
RE: Redirect issue - by includebeer - 08-05-2019, 06:47 AM
RE: Redirect issue - by InsiteFX - 08-02-2019, 02:41 PM
RE: Redirect issue - by includebeer - 08-05-2019, 06:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB