CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   URL re-write not working for same filname to URL (http://www.codingforums.com/showthread.php?t=262649)

sharafatali 05-25-2012 11:30 PM

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

ssonawa 06-11-2012 06:59 AM

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?


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.