Welcome to WebmasterWorld Guest from 35.170.81.210

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Trying to 301 redirect via our .htaccess file

     
9:47 am on Jan 4, 2019 (gmt 0)

New User

joined:Jan 4, 2019
posts: 3
votes: 0


I am trying to add a straighforward redirect to the .htaccess file of the website i'm (supposedly) administering.

Sadly I don't really understand the way this website has been set up due to experience in front end HTML/CSS work mostly, so i am trying to tiptoe around the core functionality where possible so that nothing breaks.

Having come to the issue of redirecting existing pages to new pages on the updated site that we are going to replace the old one with in february, I am just trying to test 301 redirects in the existing .htaccess file so that i can confirm that these work. But nothing seems to.

I've tried several versions which i've posted below, but none of these appears to have any effect?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^business-mobile.htm /blahtest.htm [L,R=301]
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* [F,L]
</IfModule>


Or -

<IfModule mod_rewrite.c>
RewriteEngine On
RedirectPermanent business-mobile.htm blahtest.htm
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* [F,L]
</IfModule>


Or -

<IfModule mod_rewrite.c>
RewriteEngine On
RedirectPermanent business-mobile.htm blahtest.htm
RewriteRule ^(.*/)?\.svn/ - [F,L]
ErrorDocument 403 "Access Forbidden"
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* [F,L]
</IfModule>


From what I understand, the lines
RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden"
should come out as we do not use svn any longer (this is quite an old file / website) but other than that, I am quite far out of my depth here. I'd really appreciate any advice from anyone familiar with how an htaccess file functions?
3:55 am on Jan 11, 2019 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11887
votes: 250


Apologies phranque, I fed you a bum steer earlier.

btw i meant "magic" as an arthur c clarke reference:
3. "Any sufficiently advanced technology is indistinguishable from magic."

so now we know...
8:35 pm on Jan 13, 2019 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Aug 29, 2006
posts:1378
votes: 18


so now we know...

Please see this thread: [webmasterworld.com...]

And apologies again for the confusion.

...
This 32 message thread spans 2 pages: 32
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members