1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

FAQ: mod_rewrite, 301 redirects, and optimizing Apache.

Discussion in 'Apache' started by Nintendo, Jul 30, 2005.

  1. makeit easy

    makeit easy Active Member

    Messages:
    2,067
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #901
    makeit easy, Aug 22, 2010 IP
    SEMrush
  2. makeit easy

    makeit easy Active Member

    Messages:
    2,067
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #902
    makeit easy, Aug 22, 2010 IP
  3. Hubb

    Hubb Guest

    Messages:
    41
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #903
    Very thorough tutorial, thanks Nintendo :)
     
    Hubb, Aug 23, 2010 IP
  4. trung

    trung Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #904
    Hi Nintendo,

    /showthread.php?t=23044&page=17
    In ↑ link, can you delete my post OR delete following contents in my post?
    mdev.goo-net.com
    m.goo-net.com

    Thank you very very very much :)
    (my old account was expired...)

    trung
     
    Last edited: Sep 27, 2010
    trung, Sep 27, 2010 IP
  5. KingOle

    KingOle Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #905
    Awesome tutorial :) Going to help a lot when I get around to configuring apache.
     
    KingOle, Oct 25, 2010 IP
  6. Johnburk

    Johnburk Peon

    Messages:
    777
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #906
    Anyone have any tips and suggestions for turning

    /page/?forumaction=viewtopic&t=25.0

    to

    /page/title-of-the-page

    Within a wordpress forum. So the is arleady a .htacces file that creates /page based on the permalinks settings of wordpress. And within that virtual page there is a plugin that works with ?forumaction=viewtopic&t=25.0
     
    Last edited: Nov 17, 2010
    Johnburk, Nov 17, 2010 IP
  7. elranas

    elranas Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #907
    Here is the code i'm using in the .htaccess:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule product_detail/name/(.*)/ product_detail.php?name=$1
    RewriteRule product_detail/name/(.*) product_detail.php?name=$1

    what is the problem?
     
    elranas, Jan 8, 2011 IP
  8. lastsuperman

    lastsuperman Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #908
    I am facing this bug
    "Warning: Cannot modify header information - headers already sent by (output started at /home5/web/public_html/abc.php(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code:873) in /home5/web/public_html/main_lib_update.php on line 248"

    Can anybody help me out to fix this bug.
     
    lastsuperman, Jul 22, 2011 IP
  9. seopriest

    seopriest Member

    Messages:
    347
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #909
    thanks.... very nice tutorial ...

    Panda Effect ... want to know this ...

    1) do u know any code to redirect all urls with _ in it to - on same site... basically what the problem is ... google indexed all my pages url in both formats and taking it as duplicate content i.e. title, desc tags .... so after panda update this hit my site badly

    2) I was looking for something for my site http://www.BulkPing.com/ where i got 700k RSS Feeds Generated by my visitors for Free and i want to redirect few dead ones and also this apache settings might help in time out problem when users ping more then 50000 urls on it in 1 shot ...

    Thanks again

    John
    BulkPing.com
     
    seopriest, Sep 6, 2011 IP
  10. federal

    federal Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #910
    federal, Sep 9, 2011 IP
  11. ead

    ead Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #911
    visit us on

    vacationrentalsfox.com :)
     
    ead, Oct 31, 2011 IP
  12. Deadsquirrel

    Deadsquirrel Well-Known Member

    Messages:
    166
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    110
    #912
    What about using httpd.conf file instead of .htaccess?

    Im trying to do this
    RewriteEngine On
    RewriteRule http://www.eaxmple.co.uk/about.htm$ http://www.example.co.uk/promise.htm [R=301,L]

    But wherever i place the code in httpd.conf, it does not work. I am restarting the Apache server after every change and it works fine in .htaccess.

    Any ideas?
     
    Deadsquirrel, Feb 7, 2012 IP
  13. mada0o

    mada0o Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #913
    I applied this to my page
     
    mada0o, Mar 4, 2012 IP
  14. Jez

    Jez Well-Known Member

    Messages:
    532
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    138
    #914
    Can anyone tell me what is wrong with this please?

    There are loads more URL's but these are gist of it. Here's what I have:

    #redirects from old site
    redirect 301 /blog/ /about-us/blog/

    RedirectMatch 301 ^/some-stuff(.*) http://www.example.com/more-stuff/

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Any help is welcome. My site is getting in a real mess
     
    Jez, Jun 21, 2012 IP
  15. www.tambao.vn

    www.tambao.vn Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #915
    Good, many thanks
     
    www.tambao.vn, Jul 5, 2012 IP
  16. Sefket

    Sefket Member

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #916
    Very nice thread. A lot of information.
     
    Sefket, Jul 20, 2012 IP
  17. Steupz

    Steupz Peon

    Messages:
    918
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #917
    If the above is /directory/file1.html
    to: /directory/file1/

    What would be file01 to infinity.html to new domain/new file name
     
    Steupz, Jul 23, 2012 IP
  18. digitalcontents

    digitalcontents Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #918
    No doubt Nintendo's info is very useful and i got many technical points to manage my URL rewrite requirements, but right now i am in proper communications with my developers and SEO strategist and initiate the work as per business model requirements, I am happy that eventually i came to the results that i don't need dynamic pages, my niche is travel and I use to book and reserve arik-airways.co.uk tickets so simple HTML static pages as the best choices for us, meanwhile a domain with ready-made web stuff and enormous contents that i just deal against a heavy budget in last two weeks....really need URL rewrite, Thanks Nintendo....gona follow you on arikair do net.

    Hopefully your techniques would work for me.

    Best
     
    digitalcontents, Aug 7, 2012 IP
  19. kallyjhons

    kallyjhons Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #919
    I studied Nintenjo stuff, found it interesting and really gona apply for my stuff. lets see if URL rewrite could help in some way,,
     
    kallyjhons, Aug 7, 2012 IP
  20. narkoz_39

    narkoz_39 Greenhorn

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #920
    thanks you guy..I need this thread..
     
    narkoz_39, Oct 22, 2012 IP