Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 9 Months ago .htaccess redirect from mydomain.com to mydomain.com/forum
#1
Solved: 4 Years, 9 Months ago
Hi, how to create a redirect with .htaccess from mydomain.com to mydomain.com/forum ?


Code of my .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^unturned\.it
RewriteRule (.*) http://www.unturned.it/$1 [R=301,L]
Reply
#2
Solved: 4 Years, 9 Months ago
Here is a code :


RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule (.*)$ http://www.domain.com/forum$1 [R=301,L]

Need Help :- Forex Trading. Binary Option Trading. Google Adsense. Affiliate. Pay Per Call. Cloud Hosting. Contact me on Skype : Rajeev-rrs
Reply
#3
Solved: 4 Years, 9 Months ago
This user has been denied support. This user has been denied support.
(01-02-2015, 12:03 PM)rajeevrrs55 Wrote: Here is a code :



RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule (.*)$ http://www.domain.com/forum$1 [R=301,L]


You forgot to escape the dots also wouldn't that just inf redirect?
iirc as he wants a folder redirect but still keep files available,
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/forum/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forum/$1 [L]
Beep Boop          
                                          ~ RIP Server 2014-2014
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)