redirect to folder
#1
Hello

I want to direct my site to the forum folder, can you help me?

Note: Google SEO board, what kind of guidance should I give?

I tried these but it didn't work

Options +FollowSymLinks
RewriteEngine On
RedirectMatch 301 //(.*) /forum/
Reply
#2
if you want Redirect your root directory to a subdirectory , you can use this.

RewriteEngine on
RewriteCond %{HTTP_HOST} example\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /blog/$1 [L]
Reply
#3
(2023-10-11, 10:21 PM)Mostafa.Shiraali Wrote: if you want Redirect your root directory to a subdirectory , you can use this.

RewriteEngine on
RewriteCond %{HTTP_HOST} example\.com [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ /blog/$1 [L]

I know this, but unfortunately it gives an error when I enter the subjects.

thank you again
Reply
#4
for rewrite every thing you can use like this

RewriteRule .* subfolder/ [L]
Reply
#5
Another simple thing: change the DocumentRoot of your vhost to match your forum directory.
https://httpd.apache.org/docs/current/en...cumentroot
Tchat en français
Do not ask me help through PM or Discord

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)