anyone here expert at rewrite for .htaccess with dynamic urls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spacedog
    Yes that IS me. Bitch.
    • Nov 2001
    • 14149

    #1

    anyone here expert at rewrite for .htaccess with dynamic urls

    I need help with dynamic url rewrite in .htaccess..

    I give free blog post on pr 2 videos/movies blog if you make my problem go away.

    348-132-803 <<<
  • CS-Jay
    Confirmed User
    • Oct 2003
    • 1794

    #2
    I'm not a huge expert but I've done all my sites. I could help if you like to hit me up
    I do stuff - aIm CS_Jay_D

    Comment

    • fris
      Too lazy to set a custom title
      • Aug 2002
      • 55679

      #3
      post the question here, you will get more help that way
      Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

      Comment

      • Tube Ace
        So Fucking Banned
        • Nov 2008
        • 4941

        #4
        post what you need here and I can help.

        Comment

        • spacedog
          Yes that IS me. Bitch.
          • Nov 2001
          • 14149

          #5
          I have this in .htaccess

          PHP Code:
          Options +FollowSymLinks
          RewriteEngine on
          RewriteCond %{HTTP_HOST} !^www\.domain\.com
          RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
          RewriteRule ^index.php?page=([0-9]+)&cat=([0-9]+)$  index.php?page=$1&cat=$2 [L]
          RewriteCond %{QUERY_STRING} .  
          RewriteRule ^/?$ http://mysponsors404page.com [L] 
          

          Now.. my site dynamically generates archives as more galleries are added, and so have

          domain.com
          domain.com/index.php?page=1
          domain.com/index.php?page=2 and so on as many pages as I have..

          Problem I have though is when someone types in query such as domain.com?anything it still shows index and I want it to go to 404, which the above .htaccess solved when I added it, however..

          when it is domain.com/index.php?anything it does not 404 and the last thing is about pages that have yet to be created and do not exist yet..so, how would I make page=18 404 if I only have say 15 pages?
          Last edited by spacedog; 12-18-2008, 07:10 PM.

          Comment

          • Ivan Fuckalot
            Confirmed User
            • Jun 2007
            • 825

            #6
            you can donate me $5
            http://www.htaccesstools.com
            http://www.pantyhoseone.com

            Comment

            • spacedog
              Yes that IS me. Bitch.
              • Nov 2001
              • 14149

              #7
              Originally posted by Ivan Fuckalot
              you can donate me $5
              http://www.htaccesstools.com
              answer not there.. no $5 for you

              Comment

              • spacedog
                Yes that IS me. Bitch.
                • Nov 2001
                • 14149

                #8
                this one's in regards to blogs..

                .htaccess has;

                PHP Code:
                # BEGIN WordPress
                <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteBase /
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.+)$ /index.php/$1 [L]
                </IfModule>
                
                # END WordPress
                <Files .htaccess>
                order allow,deny
                deny from all
                </Files>
                RewriteCond %{HTTP_HOST} !^www\.blog\.net
                RewriteRule (.*) http://www.blog.net/$1 [R=301,L]
                RewriteCond %{QUERY_STRING} .   
                RewriteRule ^/?$ http://www.404page.com [L] 
                
                So, when user types blog.net?whatever it goes 404 to external 404 page....

                yet, when user types blog.net/postname?whatever or blog.net/postname/?whatever or blog.net/category/postname?whatever it don't go to 404 and just shows the page????

                Comment

                • spacedog
                  Yes that IS me. Bitch.
                  • Nov 2001
                  • 14149

                  #9
                  I also see that page=1 I can make into page=1&whateverifuckingwant or page=1?fuckingbitch, etc also show page=1, but I want them to go to 404.

                  Comment

                  • spacedog
                    Yes that IS me. Bitch.
                    • Nov 2001
                    • 14149

                    #10
                    where's smokey? I bet he know's the answer

                    Comment

                    • leek
                      Confirmed User
                      • May 2008
                      • 342

                      #11
                      Originally posted by spacedog
                      I give free blog post on pr 2 videos/movies blog if you make my problem go away.
                      I'll get up with you soon on that blog post.

                      Comment

                      • Dopy
                        Confirmed User
                        • Feb 2001
                        • 1572

                        #12
                        Originally posted by spacedog

                        how would I make page=18 404 if I only have say 15 pages?

                        The script should handle the page out of range either by delivering page 1 or redirect 404.

                        Comment

                        Working...