FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change htaccess for access to 1 folder
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Change htaccess for access to 1 folder
Posted: Fri Jan 07, 2022 09:29 PM

I once changed my htaccess file in order to forward ALL link, access and calls to the oldsite to the new site.

I have a FIVEWIN folder on it in order to upload images to post insite the forum here, but that also forward all pictures to the new index of the new domain.
My hosting says to look at the internet for a sample to do so :twisted: :twisted:
I 'm not able to do it and tried some samples, but it is tuff... Any ideas ?

This is now insite it (just renamed my site to 'mysite' tekst

sample : www.maveco.be/fivewin/test.jpg will bring you to my site and not post the pic here as usual...

File :

~~advancedcms landing start~~

Code generated by http://www.301-redirect.online

RewriteEngine on

RewriteCond %{QUERY_STRING} ^$

RewriteRule $ https://www.mysite.be/ [R=301,L]

RewriteCond %{REQUEST_URI}!^/fivewin/

RewriteRule ^(.*)$ https://www.mysite.be/ [R=301,L]

RewriteRule !^fivewin($|/) https://mysite.be/ [L,R=301]
RewriteRule !^eshop($|/) https://mysite.be/ [L,R=301]

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

Options +SymLinksIfOwnerMatch -MultiViews
RewriteEngine on
RewriteRule . - [E=REWRITEBASE:/]
RewriteCond %{REQUEST_URI} /$
RewriteCond %{QUERY_STRING} !(^|&amp;)rand=
RewriteCond %{QUERY_STRING} !(^|&amp;)mylogout=
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php?fc=module&amp;module=advancedcms&amp;controller=adcms&amp;id_cms=22&amp;rewrite=Maveco_Main [L]

</IfModule>

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Change htaccess for access to 1 folder
Posted: Sat Jan 08, 2022 09:01 AM
Dear Marc,

With mod_harbour CGI version we do it this way:
Code (fw): Select all Collapse
<Directory C:/xampp/htdocs>
  RewriteEngine on
  RewriteRule ^([a-zA-Z]*)$ /cgi-bin/modharbour.exe?$1 [NC,QSA]
</Directory>

https://github.com/FiveTechSoft/mod_harbour/tree/master/cgi

I wasn't aware of http://www.301-redirect.online thank you
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion