Need to redirect part of a link

6 replies
  • WEB DESIGN
  • |
Aloha,

I need to take all instances of

*.php#c3

Example www. godsbusinessway.com/index.php#c3

and convert it to

*.php?action=forum#c3

Example www. godsbusinessway.com/index.php?action=forum#c3

I'm not very good with .htaccess, but I was told I could do it in there

Rick
#link #part #redirect
  • Profile picture of the author Cram
    you may try inserting this into your .htacess
    Code:
    ## 301 Redirect Old File
    Redirect 301 /index.php#3 /index.php?action=forum#c3
    htacces generator
    htaccessredirect.com
    htaccessredirect.co.uk
    htaccessredirect.net
    {{ DiscussionBoard.errors[8539408].message }}
  • Profile picture of the author yestyle
    Banned
    Using Trim and Replace command in PHP after that using Header redirect function to redirect your url.
    {{ DiscussionBoard.errors[8542922].message }}
  • Profile picture of the author Nathan K
    Only index.php
    ------------------------------------------------------------------------
    RewriteEngine On
    RewriteRule ^index\.php#c3$ index.php?action=forum#c3 [R=301]

    All the pages
    ------------------------------------------------------------------------
    RewriteEngine On
    RewriteRule ^([A-Za-z0-9-]+)\.php#c3$ $1.php?action=forum#c3 [R=301]

    If you want to apply the rule only for index.php, use the first option otherwise use the second option.
    {{ DiscussionBoard.errors[8544198].message }}
  • if your using wordpress I would install the "Re-direct" plug in there.
    Signature
    WebDevelopmentGroup NYC & CA- Small Business Web Development, App Development, WordPress Development, Graphic Designs, Online Marketing, Local Marketing & more!. "Call us 1.800.219.1314 or message us!". Visit us today! "Now On Live Chat Mon-Fri.". www.WebDevelopmentGroup.org
    (Whitelable our Services)
    ===================================
    ==> #1 OFFLINE MARKETING FORUM ON THE WEB! <==
    www.OFFLINEMARKETINGFORUM.com
    (Register Now)
    {{ DiscussionBoard.errors[8545427].message }}

Trending Topics