Results 1 to 7 of 7

Thread: htacess issue

  1. #1
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default htacess issue

    Code:
    Options +FollowSymLinks -MultiViews 
    RewriteEngine On
    RewriteBase /
    ErrorDocument 404 /404.shtml
    
    RewriteRule profile/([a-zA-Z0-9\-]+)-([0-9]+) profile.php?name=$1&userid=$2
    RewriteRule messages messages.php
    RewriteRule view-wallpaper/([a-zA-Z0-9\-]+)-([0-9]+) view_wallpaper.php?title=$1&id=$2

    Hi guys, i want to know if my htacess format is correct because i am facing an issue while generating xml sitemap for my website.

    It is generating some url like this

    http://mywebsite.com/view-wallpaper/view-wallpaper/view-wallpaper/wallpapername-2
    http://mywebsite.com/view-wallpaper/view-wallpaper/wallpapername-3

    but the correct format is below

    http://mywebsite.com/view-wallpaper/wallpapername-2
    http://mywebsite.com/view-wallpaper/wallpapername-3
    Last edited by jscheuer1; 01-20-2014 at 01:49 PM. Reason: Format

  2. #2
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default

    Please look into this, anyone?

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by ankush View Post
    Hi guys, i want to know if my htacess format is correct
    If your htaccess file format was incorrect, you would get an Internal Server Error (500) when you visited your site.
    This doesn't mean that it does what you expect, of course. If you type in one of your desired URLs (e.g., http://mywebsite.com/view-wallpaper/wallpapername-2), do you see the correct page?


    Quote Originally Posted by ankush View Post
    … i am facing an issue while generating xml sitemap for my website.
    htaccess files do not generate xml sitemaps. What program are you using to do this? How does it work? Most sitemap generators will simply follow all the internal links it finds on your site.

    I would suggest searching your site for links like the ones you say are generated. The htaccess file you showed us is not responsible for this - it only generates internal redirects, which are transparent to the user (or bots, or sitemap generators). Is there another htaccess file somewhere on your site? or are there any rewrite rules in your site's apache configuration?

  4. #4
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default

    Quote Originally Posted by traq View Post
    If your htaccess file format was incorrect, you would get an Internal Server Error (500) when you visited your site.
    This doesn't mean that it does what you expect, of course. If you type in one of your desired URLs (e.g., http://mywebsite.com/view-wallpaper/wallpapername-2), do you see the correct page?



    htaccess files do not generate xml sitemaps. What program are you using to do this? How does it work? Most sitemap generators will simply follow all the internal links it finds on your site.

    I would suggest searching your site for links like the ones you say are generated. The htaccess file you showed us is not responsible for this - it only generates internal redirects, which are transparent to the user (or bots, or sitemap generators). Is there another htaccess file somewhere on your site? or are there any rewrite rules in your site's apache configuration?
    i am generating xml sitemap via some online generator
    so my problem is that it is generating some url like this in xml sitemap

    Code:
    http://mywebsite.com/view-wallpaper/view-wallpaper/view-wallpaper/wallpapername-2
    but the actual url is

    Code:
    http://mywebsite.com/view-wallpaper/wallpapername-2
    so i am getting a 404 error for the above url

    no, there are only 1 htacess

  5. #5
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,937
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    11

    Default

    Can you confirm that the xml sitemap generation works fine when the htaccess file is temporarily disabled?
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  6. #6
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default

    i have tried to disable .htacess but then it is generating only homepage in xml sitemap.

    i think the problem is with absolute url, i am changing all url

    Code:
    from wallpapers/wallpaper-name-123
    to

    Code:
    http://mysite.com/wallpapers/wallpaper-name-123
    i will let you know the updates.

  7. #7
    Join Date
    Jan 2012
    Location
    India
    Posts
    43
    Thanks
    12
    Thanked 1 Time in 1 Post

    Default

    guys it is fixed by replacing the url from "somepage.php" to "mysite.com/somepage.php"

    Thanks all

Similar Threads

  1. Replies: 3
    Last Post: 02-15-2011, 01:37 AM
  2. AnyLink Drop Down Menu - border issue *and* FF alignment issue
    By trjonas in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 12-18-2007, 04:58 AM
  3. Email issue -- Carbon Copy Issue
    By Humper in forum HTML
    Replies: 0
    Last Post: 09-01-2006, 09:01 PM
  4. Email issue -- Carbon Copy Issue
    By Humper in forum PHP
    Replies: 1
    Last Post: 09-01-2006, 08:47 PM
  5. Email issue -- Carbon Copy Issue
    By Humper in forum JavaScript
    Replies: 0
    Last Post: 09-01-2006, 07:26 PM

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
  •