Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Hamaas447

4 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley277

Below is the code you can use in .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ example.com:81/ [P]
</IfModule>

10% popularity Vote Up Vote Down


 

@Deb1703797

This might do what you are looking for:

RewriteEngine on
RewriteCond %{SERVER_PORT} ^81$ # check if port 81
RewriteCond %{REQUEST_URI} ^site/ # check if it starts with "site/"
RewriteRule .* %{SERVER_NAME}%{REQUEST_URI} [R,L]


[R=301,L] if you want permanent redirect (the :81 taken out of SEO results for example).
Im not really sure if you have to add :80 after the %{SERVER_NAME}, please let me know so I can update the answer.

10% popularity Vote Up Vote Down


 

@Pierce454

You need to have a web server running at example.com:81, and create a .htaccess file there.

10% popularity Vote Up Vote Down


 

@Karen161

On example.com:81 create .htaccess file (where site/ is):

RewriteEngine on
RewriteRule (.*) example.com:80/ [P,L]


With this when you go to example.com:81 the site will proxy to example.com.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme