Change htaccess for access to 1 folder

Change htaccess for access to 1 folder

Postby Marc Venken » Fri Jan 07, 2022 9: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} !(^|&)rand=
RewriteCond %{QUERY_STRING} !(^|&)mylogout=
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php?fc=module&module=advancedcms&controller=adcms&id_cms=22&rewrite=Maveco_Main [L]
</IfModule>
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1434
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Change htaccess for access to 1 folder

Postby Antonio Linares » Sat Jan 08, 2022 9:01 am

Dear Marc,

With mod_harbour CGI version we do it this way:
Code: Select all  Expand view  RUN
<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
User avatar
Antonio Linares
Site Admin
 
Posts: 42103
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 63 guests