TransWikia.com

modifying htaccess for localhost with a custom port

WordPress Development Asked by jamm on December 22, 2021

I have a live instance of wordpress which I’m attempting to spin up on my local machine using xampp. A brief summary of steps to where I’m currently at:

  1. configured xampp to use a custom port (8012)
  2. downloaded the latest files and database
  3. added the entire public_html file to my new directory (‘support’) within xampp: C:xampphtdocssupport
  4. Modified all instances of the live URL to my localhost URL localhost:8012/support in the database
  5. Uploaded the database to phpmyadmin
  6. updated the wp-config with the traditional username,pw and new localhost:8012 URL
  7. made a few slight tweaks to the php.ini files and phpmyadmin config.default file so there isn’t any limits

…and boom! stuck. when i attempt to load localhost:8012/support, I should be greeted with a login page. Instead, I’m getting a continual load and then timeout.

I’ve had this working before, and remember that I have to modify the .htaccess file but every attempt at updating this file in the rewrite module section, is resulting in the same outcome. I’m 99% certain this is the issue. This is what it’s currently set to – any ideas?

RewriteEngine On
RewriteBase /support/
RewriteRule ^index.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .localhost:8012/support [L]
</IfModule>

I’ve updated both the RewriteBase and RewriteRule with several different versions (including http:// and including index.php), but still breaks/doesn’t load. I’ve no prior knowledge around this, so a little help as to what value should go here should go here would be appreciated.

One Answer

To be honest, I'd change my .conf file to state the correct port if you've got access to that.

For instance.

<VirtualHost *:8012>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/LOCATION OF FILES
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/LOCATION OF FILES>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

Then i'd restart apache. (if you are using apache that is)

Answered by stoneseraphim on December 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP