SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Incorrect _index url for my site categories

    Hi,

    After loading my site www.FlashUser.net ( wordpress 3.5 ) in a browser and click on a category from the top categories ( Css, Freebies, Inspiration etc ) I see this link in the browser:

    http://www.flashuser.net/_index ( which does not exist in my site, I guess is the default 404 page )

    If I click on the Css category the correct link should be http://www.flashuser.net/category/css ( as you see when mouse over a category in the bottom bar of the browser or page source )

    If I click on the Freebies category the correct link should be http://www.flashuser.net/category/freebies

    and so on

    I have addressed this to the hosting support couple of times but none knows to give me a solution on what is this and how to solve it.

    ( sometimes the category pages loads correctly but most of the time this _index url is displayed, the rest of the site pages loads fine )

    Hope someone has an idea and can help. Thanks.

    Regards,
    Mike

  2. #2
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    265
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi
    Check in the .htaccess file, maybe it is some code that redirects to "_index".
    The problem can be also from a javascript script, or in php, hard to guess, but maybe someone else know for sure the solution.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners

  3. #3
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MarPlo View Post
    Hi
    Check in the .htaccess file, maybe it is some code that redirects to "_index".
    The problem can be also from a javascript script, or in php, hard to guess, but maybe someone else know for sure the solution.
    Thank you for your reply.

    I have checked the .htaccess file and I have the following rules for categories:

    RedirectMatch 301 /freebies/(.*)\.(html) http://www.flashuser.net/$1


    this redurects the old posts from this category to a new url but the category link returns 404...

  4. #4
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi c1pri,

    Have you seen a pattern where is works consistently for one category or a set of step you take? At this point the RedirectMatch should not create all categories to perform this way. I'll let the expert rewriters comment on your rewrite string, but at this point as @MarPlo has said it could be a PHP router (switch statement) failing, or JavaScript; or even a overcrowded shared hosting not keeping up so it fails when under high load and doesn't under low load.

    Do you have a local WAMP or LAMP stack setup so that you can transfer the site and test it in a different environment to see if it is the code or the host?

    Have you tested with JavaScript disabled?

    Have you investigated how the categories are being routed in the application - by reviewing the index page and see how categories are dispatched and routed?

    You must have a rewriting script that is transforming your url into a pretty form. Can you paste the whole rewriting script here?

    Regards,
    Steve
    ictus==""

  5. #5
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ServerStorm View Post
    Hi c1pri,

    Have you seen a pattern where is works consistently for one category or a set of step you take? At this point the RedirectMatch should not create all categories to perform this way. I'll let the expert rewriters comment on your rewrite string, but at this point as @MarPlo has said it could be a PHP router (switch statement) failing, or JavaScript; or even a overcrowded shared hosting not keeping up so it fails when under high load and doesn't under low load.

    Do you have a local WAMP or LAMP stack setup so that you can transfer the site and test it in a different environment to see if it is the code or the host?

    Have you tested with JavaScript disabled?

    Have you investigated how the categories are being routed in the application - by reviewing the index page and see how categories are dispatched and routed?

    You must have a rewriting script that is transforming your url into a pretty form. Can you paste the whole rewriting script here?

    Regards,
    Steve
    Hello,

    I haven't seen such pattern ( it's possible to be the host - I have the site hosted at bluehost - although as far as I know they are pretty known hosting company, but as a last alternative I will will transfer and test the site to another host ... I have performed a small similar rewrite test on another wordpress site I have / different hosting and seems to work fine ... but it's pretty hard to believe that the hosting is the problem ).

    For the moment I am looking for a simpler solution.

    Basically I have this RedirectMatch rules to point some old posts to new urls. My question would be ... how long does it takes for Google to index the new urls? After the re-indexing I still need to have these .htaccess rules or I can comment them ?

    If I comment the rewrite line the category url is always displayed correctly, activate again the rule line and the 404 not found problem shows up again.

    I don't have a rewriting script, I have these rewrite rules inside .htaccess which are interpretted by the web server ).

    Regards,
    Mike

  6. #6
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by c1pri View Post
    Hello,

    I haven't seen such pattern ( it's possible to be the host - I have the site hosted at bluehost - although as far as I know they are pretty known hosting company, but as a last alternative I will will transfer and test the site to another host ... I have performed a small similar rewrite test on another wordpress site I have / different hosting and seems to work fine ... but it's pretty hard to believe that the hosting is the problem ).

    For the moment I am looking for a simpler solution.

    Basically I have this RedirectMatch rules to point some old posts to new urls. My question would be ... how long does it takes for Google to index the new urls? After the re-indexing I still need to have these .htaccess rules or I can comment them ?

    If I comment the rewrite line the category url is always displayed correctly, activate again the rule line and the 404 not found problem shows up again.

    I don't have a rewriting script, I have these rewrite rules inside .htaccess which are interpretted by the web server ).

    Regards,
    Mike
    Hi Mike,

    If you have ruled out that your server (at your host) is not the problem then there is no need to do this test.

    Could you post your entire .htaccess file?

    301 and 302 redirects are cached both in search engines like Google, but also in visitors Chrome and Firefox browsers. It really depends on how many visitors have run through the redirect and how many search engine indexing bots have travelled through. There is no specific set time. You can pay attention to your search engine rankings and ensure they are using the correct URL paths.

    Steve
    ictus==""

  7. #7
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ServerStorm View Post
    Hi Mike,

    If you have ruled out that your server (at your host) is not the problem then there is no need to do this test.

    Could you post your entire .htaccess file?

    htaccess.zip

    Steve
    Hello,

    Find attached the .htaccess file.

    Regards,
    Mike

  8. #8
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi Mike,

    Sorry I meant for you to post your .htaccess in a code block. Don't worry I've done it here. Calling the rewrite gurus

    Code:
    # BEGIN W3TC Browser Cache
    <IfModule mod_mime.c>
        AddType text/css .css
        AddType application/x-javascript .js
        AddType text/x-component .htc
        AddType text/html .html .htm
        AddType text/richtext .rtf .rtx
        AddType image/svg+xml .svg .svgz
        AddType text/plain .txt
        AddType text/xsd .xsd
        AddType text/xsl .xsl
        AddType text/xml .xml
        AddType video/asf .asf .asx .wax .wmv .wmx
        AddType video/avi .avi
        AddType image/bmp .bmp
        AddType application/java .class
        AddType video/divx .divx
        AddType application/msword .doc .docx
        AddType application/vnd.ms-fontobject .eot
        AddType application/x-msdownload .exe
        AddType image/gif .gif
        AddType application/x-gzip .gz .gzip
        AddType image/x-icon .ico
        AddType image/jpeg .jpg .jpeg .jpe
        AddType application/vnd.ms-access .mdb
        AddType audio/midi .mid .midi
        AddType video/quicktime .mov .qt
        AddType audio/mpeg .mp3 .m4a
        AddType video/mp4 .mp4 .m4v
        AddType video/mpeg .mpeg .mpg .mpe
        AddType application/vnd.ms-project .mpp
        AddType application/x-font-otf .otf
        AddType application/vnd.oasis.opendocument.database .odb
        AddType application/vnd.oasis.opendocument.chart .odc
        AddType application/vnd.oasis.opendocument.formula .odf
        AddType application/vnd.oasis.opendocument.graphics .odg
        AddType application/vnd.oasis.opendocument.presentation .odp
        AddType application/vnd.oasis.opendocument.spreadsheet .ods
        AddType application/vnd.oasis.opendocument.text .odt
        AddType audio/ogg .ogg
        AddType application/pdf .pdf
        AddType image/png .png
        AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
        AddType audio/x-realaudio .ra .ram
        AddType application/x-shockwave-flash .swf
        AddType application/x-tar .tar
        AddType image/tiff .tif .tiff
        AddType application/x-font-ttf .ttf .ttc
        AddType audio/wav .wav
        AddType audio/wma .wma
        AddType application/vnd.ms-write .wri
        AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
        AddType application/zip .zip
    </IfModule>
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css A31536000
        ExpiresByType application/x-javascript A31536000
        ExpiresByType text/x-component A31536000
        ExpiresByType text/html A3600
        ExpiresByType text/richtext A3600
        ExpiresByType image/svg+xml A3600
        ExpiresByType text/plain A3600
        ExpiresByType text/xsd A3600
        ExpiresByType text/xsl A3600
        ExpiresByType text/xml A3600
        ExpiresByType video/asf A31536000
        ExpiresByType video/avi A31536000
        ExpiresByType image/bmp A31536000
        ExpiresByType application/java A31536000
        ExpiresByType video/divx A31536000
        ExpiresByType application/msword A31536000
        ExpiresByType application/vnd.ms-fontobject A31536000
        ExpiresByType application/x-msdownload A31536000
        ExpiresByType image/gif A31536000
        ExpiresByType application/x-gzip A31536000
        ExpiresByType image/x-icon A31536000
        ExpiresByType image/jpeg A31536000
        ExpiresByType application/vnd.ms-access A31536000
        ExpiresByType audio/midi A31536000
        ExpiresByType video/quicktime A31536000
        ExpiresByType audio/mpeg A31536000
        ExpiresByType video/mp4 A31536000
        ExpiresByType video/mpeg A31536000
        ExpiresByType application/vnd.ms-project A31536000
        ExpiresByType application/x-font-otf A31536000
        ExpiresByType application/vnd.oasis.opendocument.database A31536000
        ExpiresByType application/vnd.oasis.opendocument.chart A31536000
        ExpiresByType application/vnd.oasis.opendocument.formula A31536000
        ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
        ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
        ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
        ExpiresByType application/vnd.oasis.opendocument.text A31536000
        ExpiresByType audio/ogg A31536000
        ExpiresByType application/pdf A31536000
        ExpiresByType image/png A31536000
        ExpiresByType application/vnd.ms-powerpoint A31536000
        ExpiresByType audio/x-realaudio A31536000
        ExpiresByType image/svg+xml A31536000
        ExpiresByType application/x-shockwave-flash A31536000
        ExpiresByType application/x-tar A31536000
        ExpiresByType image/tiff A31536000
        ExpiresByType application/x-font-ttf A31536000
        ExpiresByType audio/wav A31536000
        ExpiresByType audio/wma A31536000
        ExpiresByType application/vnd.ms-write A31536000
        ExpiresByType application/vnd.ms-excel A31536000
        ExpiresByType application/zip A31536000
    </IfModule>
    <IfModule mod_deflate.c>
        <IfModule mod_setenvif.c>
            BrowserMatch ^Mozilla/4 gzip-only-text/html
            BrowserMatch ^Mozilla/4\.0[678] no-gzip
            BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
            BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        </IfModule>
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
        </IfModule>
    </IfModule>
    <FilesMatch "\.(css|js|htc|CSS|JS|HTC)$">
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header set Cache-Control "public, must-revalidate, proxy-revalidate"
        </IfModule>
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header set Cache-Control "public, must-revalidate, proxy-revalidate"
        </IfModule>
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
        <IfModule mod_headers.c>
            Header set Pragma "public"
            Header set Cache-Control "public, must-revalidate, proxy-revalidate"
        </IfModule>
        FileETag MTime Size
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.4"
        </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteRule ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [L]
        RewriteCond %{HTTP_USER_AGENT} (2\.0\ mmp|240x320|alcatel|amoi|asus|au\-mic|audiovox|avantgo|benq|bird|blackberry|blazer|cdm|cellphone|danger|ddipocket|docomo|dopod|elaine/3\.0|ericsson|eudoraweb|fly|haier|hiptop|hp\.ipaq|htc|huawei|i\-mobile|iemobile|j\-phone|kddi|konka|kwc|kyocera/wx310k|lenovo|lg|lg/u990|lge\ vx|midp|midp\-2\.0|mmef20|mmp|mobilephone|mot\-v|motorola|netfront|newgen|newt|nintendo\ ds|nintendo\ wii|nitro|nokia|novarra|o2|openweb|opera\ mobi|opera\.mobi|palm|panasonic|pantech|pdxgw|pg|philips|phone|playstation\ portable|portalmmm|ppc|proxinet|psp|pt|qtek|sagem|samsung|sanyo|sch|sec|sendo|sgh|sharp|sharp\-tq\-gx10|small|smartphone|softbank|sonyericsson|sph|symbian|symbian\ os|symbianos|toshiba|treo|ts21i\-10|up\.browser|up\.link|uts|vertu|vodafone|wap|willcome|windows\ ce|windows\.ce|winwap|xda|zte) [NC]
        RewriteRule .* - [E=W3TC_UA:_low]
        RewriteCond %{HTTP_USER_AGENT} (acer\ s100|android|archos5|blackberry9500|blackberry9530|blackberry9550|cupcake|docomo\ ht\-03a|dream|htc\ hero|htc\ magic|htc_dream|htc_magic|incognito|ipad|iphone|ipod|lg\-gw620|liquid\ build|maemo|mot\-mb200|mot\-mb300|nexus\ one|opera\ mini|samsung\-s8000|series60.*webkit|series60/5\.0|sonyericssone10|sonyericssonu20|sonyericssonx10|t\-mobile\ mytouch\ 3g|t\-mobile\ opal|tattoo|webmate|webos) [NC]
        RewriteRule .* - [E=W3TC_UA:_high]
        RewriteCond %{HTTP_COOKIE} w3tc_referrer=.*(google\.com|yahoo\.com|bing\.com|ask\.com|msn\.com) [NC]
        RewriteRule .* - [E=W3TC_REF:_search_engines]
        RewriteCond %{HTTPS} =on
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{SERVER_PORT} =443
        RewriteRule .* - [E=W3TC_SSL:_ssl]
        RewriteCond %{HTTP:Accept-Encoding} gzip
        RewriteRule .* - [E=W3TC_ENC:_gzip]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_HOST} =www.flashuser.net
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.2\.4) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}" [L]
        RewriteCond %{REQUEST_METHOD} !=POST
        RewriteCond %{QUERY_STRING} =""
        RewriteCond %{HTTP_HOST} =www.flashuser.net
        RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php|index\.php) [NC,OR]
        RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
        RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
        RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.2\.4) [NC]
        RewriteCond "%{DOCUMENT_ROOT}/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.xml%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/w3tc/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.xml%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core
    # 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
    
    
    Redirect 301 /flash-of-the-day/flash-of-the-day-1.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-2.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-3.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-4.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-5.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-6.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-7.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-8.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-8.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-10.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-11.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-12.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-13.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-14.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-15.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-16.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-17.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-18.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-19.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-20.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-21.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-22.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-23.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-24.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-25.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-26.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-27.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-28.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-29.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-30.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-31.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-32.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-33.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-34.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-35.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-36.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-37.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-38.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-39.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-40.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-41.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-42.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-43.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-44.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-45.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-46.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-47.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-48.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-49.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-50.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-51.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-52.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-53.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-54.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-55.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-56.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-57.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-58.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-59.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-60.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-61.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-62.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-63.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-64.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-65.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-66.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-67.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-68.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-69.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-70.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-71.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-72.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-73.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-74.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-75.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-76.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-77.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-78.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-79.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-80.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-81.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-82.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-83.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-84.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-85.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-86.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-87.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-88.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-89.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-90.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-91.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-92.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-93.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-94.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-95.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-96.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-97.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-98.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-99.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-100.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-101.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-102.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-103.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-104.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-105.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-106.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-107.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-108.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-109.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-110.html	http://www.flashuser.net
    Redirect 301 /flash-of-the-day/flash-of-the-day-111.html	http://www.flashuser.net
    RedirectMatch 301 /flash-menus/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-actionscript-as2/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-actionscript-as3/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /css/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-components/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-gallery/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-news/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-templates/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-tricks/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-tutorials/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flash-video/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /flex/(.*)\.(html) http://www.flashuser.net/$1 
    RedirectMatch 301 /freebies/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /general/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /html5/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /illustrator/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /inspiration/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /logos/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /mobile/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /photography/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /photoshop/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /resources/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /review/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /social-media/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /tutorials/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /wallpapers/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /web-design/(.*)\.(html) http://www.flashuser.net/$1
    RedirectMatch 301 /wordpress/(.*)\.(html) http://www.flashuser.net/$1
    ictus==""

  9. #9
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,671
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Before you go posting massive code, please check your WP configuration file as it sounds as if it's the likely culprit.

    It may also have written something into your .htaccess file which is why Steve was asking about that - look for DirectoryIndex or RewriteBase directives but look to WP's config.php fileS first.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  10. #10
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    Before you go posting massive code, please check your WP configuration file as it sounds as if it's the likely culprit.

    It may also have written something into your .htaccess file which is why Steve was asking about that - look for DirectoryIndex or RewriteBase directives but look to WP's config.php fileS first.

    Regards,

    DK
    Hello,

    Thanks DK for the reply but the WP config file is fine.

    I've got a reply to my ticket from my hosting provider ( bluehost ) as follows:


    What you have in there for the rule would match to the correct url with your redirect if the link to it was in the following format
    http://www.flashuser.net/freebies/ca.../freebies.html

    Because your rule first searches for a directory called /freebies/ then when it finds it matches everything behind that until it finds a dot then html . It then takes whatever was between those two and sends that to the index.php for processing (that is what that redirect tracer is interpreting as http://www.flashuser.net/_index

    you might want to try:
    RedirectMatch 301 /freebies/(.*)\.(html) http://www.flashuser.net/?$1

    and see if that works but the question mark would be visible to users.

    Thank you,
    Jason | BlueHost
    Level II Site/Script Compatibility



    I've tried what Jason suggested but it returns http://www.flashuser.net/?_index which displays the index page of my site.

    The correct category url for freebies should be http://www.flashuser.net/category/freebies

    regards,
    Mike

  11. #11
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,671
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    c1,

    Okay, if you still have a problem (which you do), please post your .htaccess file as requested earlier. That's the only way we're going to be able to sort through the internal redirections.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  12. #12
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dklynn View Post
    c1,

    Okay, if you still have a problem (which you do), please post your .htaccess file as requested earlier. That's the only way we're going to be able to sort through the internal redirections.

    Regards,

    DK

    My .htaccess was aready posted yesterday by ServerStorm in a code block -> see his message from Yesterday 02:23 ( originally sent by me in a .zip pack on Dec 19, 2012 19:09 ).

  13. #13
    SitePoint Member
    Join Date
    Dec 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In addition to my previous message here is an example to better understand the problem:

    For the photography category an old post url was:

    http://www.flashuser.net/photography...otography.html


    In the .htaccess I have this rule:

    RedirectMatch 301 /photography/(.*)\.(html) http://www.flashuser.net/$1


    The new post url is ( correct ):

    http://www.flashuser.net/great-wildlife-photography


    The category url link should be: http://www.flashuser.net/category/photography

    but when you click photography the url has that _index ( 404 not found )

    The question is what would be the solution to have the old posts and their adjacent category urls displayed correctly as I've described above?

  14. #14
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,671
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    c1,

    The question is what would be the solution to have the old posts and their adjacent category urls displayed correctly as I've described above?
    Comments on your .htaccess code first:

    1. YGBSM!

    2. Most of the Apache core code should be (and probably is already) in the httpd.conf file. You're wasting resources repeating the read/parse/execute of each of these directives MULTIPLE times for each file request made of the server.

    3. You are wasting resources asking Apache to check whether various modules exist MULTIPLE times for each file request made of the server. I have a standard (i.e., do NOT take it personally) rant for the MULTIPLE mod_rewrite checks:

    [rant #4]
    The definition of an idiot is someone who repeatedly does the same thing expecting a different result. Asking Apache to confirm the existence of ANY module with an <IfModule> ... </IfModule> wrapper is the same thing in the webmaster world. DON'T BE AN IDIOT! If you don't know whether a module is enabled, run the test ONCE then REMOVE the wrapper as it is EXTREMELY wasteful of Apache's resources (and should NEVER be allowed on a shared server).
    [/rant 4]

    4. You DO have code in your pre-WP section which redirects to an _index.php file - look to that (use your LOG file to examine redirection handling) for your _index.php problem.

    5. The long stream of mod_alias directives will be processed before mod_rewrite (because mod_alias is a core directive and mod_rewrite is not - it must be specifically enabled). This is another massive waste of resources (it belongs in your httpd.conf or httpd-vhosts.conf file, not in .htaccess) and you can use mod_rewrite's regex capability to match patterns and redirect accordingly.

    I don't know how you got to such a point with your .htaccess file but I would seriously recommend a major clean-up. That would also allow you to find problems within your code much easier.

    As for your desire to display two types of URIs, I don't believe that WP can function that way (ergo, I try to keep away from WP and other CMS's). Using mod_rewrite, you CAN create new URI formats and redirect TO the new format(s) while serving the original (functional) format. WP does a little of that for you but I think you're asking for more than WP can do (natively - is there a plug-in you're using?).

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •