Posted 12 October 2006 - 12:29 PM
actually i have uncommented the line in httpd file also but it is not woking
Posted 12 October 2006 - 12:43 PM
mod_rewrite is about rewriting URL's. if you've seen wikipedia's URLS, or URL's without lists of parameters after the filename, then mod_rewrite is possibly at work.
as it's generally done on a site by site basis, the best way is to create a text file in your webroot called .htaccess (notice the fullstop before the name).
as for the rest - you need to decide what you want to achieve with the URL, get a grasp of regular expressions and go from there. Here's the main doc for it: http://httpd.apache....od_rewrite.html
assuming you've already got that far, and it's not doing anything, do you have a: RewriteEngine On in your htaccess file?
hope that helps
I say old chap, that is rather amusing!
Posted 12 October 2006 - 02:34 PM
You need to setup some rewrite rules in a htaccess file in order for http://domainname/john to work.
Fo example. You have a file called profile.php and you use a url parameter called user, which profile.php uses to grab the details of that user. Instead having to type http://domainname/pr...?user=user_here
You want to use http://domainname/user_here
In order to do that a rewrite rule needs to be setup for modRewrite to use. So your rewrite rule will be something like this:
# Tell Apache you want to use mod_rewrite RewriteEngine On # Setup the rewrite rul RewriteRule ^([a-zA-z]+)$ profile.php?user=$1
You cannot just uncomment the mod_rewrite module and expect it to work just like that.
Posted 13 October 2006 - 05:35 AM
actually i am working with the mod_rewrite for the first time
so for checking whether its working or not
i had written the following in .htaccess
RewriteRule ^/alice\.html$ bob\.html
if user try to access alice.html bob.html should be called but its not working
Posted 13 October 2006 - 12:09 PM
now wht the problem i am facing is it is working on my system but not online
can i load mod_rewrite module frm my code because it is not enabled on my domain(online)
Posted 13 October 2006 - 01:33 PM
Ask your host whether they can enable the mod_rewrite module. If they will not enable the module then you'll either have to find a new host, or upgrade your hosting plan to one where you can control the Apache configuration yourself (most probably a dedicated server plan) or dont use mod_rewrite.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users