Change htaccess for access to 1 folder

Post Reply
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Change htaccess for access to 1 folder

Post by Marc Venken »

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.08 with Harbour
User avatar
Antonio Linares
Site Admin
Posts: 42602
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 43 times
Been thanked: 88 times
Contact:

Re: Change htaccess for access to 1 folder

Post by Antonio Linares »

Dear Marc,

With mod_harbour CGI version we do it this way:

Code: Select all | Expand

<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
Post Reply