Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Location
    Pakistan
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    URL re-write not working for same filname to URL

    Hi ,

    I am having a strange issue

    my website is running on demo
    http://www.mydomain.com/demo

    and i have following code in my htaccess

    ErrorDocument 404 notfound.php
    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^mydomain.com [nc]
    rewriterule ^(.*)$ http://www.mydomain.com/$1 [r=301,nc]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^about$ about.php [L]
    RewriteRule ^activate-user-(.*)-(.*) activate-user.php?bar=$1&med=$2 [L]
    RewriteRule ^become-sponsor$ become-sponsor.php [L]
    RewriteRule ^change-password$ change-password.php [L]
    RewriteRule ^contact$ contact.php [L]


    All the URLS are are working fine on my local machine, but when i uploaded to server, plain URLs are not working i get 404 error for them.
    For example if i access http://www.mydomain.com/contact
    same for change password and become sponsor.

    URL with query string, like for activate-user is working fine.

    I am not much experienced in URL re-writing.

    Please help me, where i am wrong, how i can fix this problem.

    Thanks

  • #2
    New Coder
    Join Date
    Jul 2008
    Location
    India
    Posts
    39
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Does any of above short URLs work fine on the server?

    if not try and check if your rewrite module is enabled?

    Also can you post your server's access logs for the incorrect urls?


  •  

    Posting Permissions

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