Jump to content

simple question rediectMATCH


hamza

Recommended Posts

okay thanks for the link but can you tel me

.htaccess dir position

 

C:\AppServ\www\rewriting practice\

1.htaccess

hamza.html

 

Can you tell me both are in right place and i am not sure .htaccess is

working with hamza.html

 

??? 

 

Link to comment
Share on other sites

  • 3 months later...

The .htaccess should be placed in the document root for the website.

Your apache configuration should allow .htaccess override.

i.e.

AccessFileName .htaccess
<Directory "/var/www/html">
AllowOverride All
</Directory>

 

by default allowing is enable or not for  .htaccess file.

can we enable it in php.ini

or

if i have many .htaccess files then evy time i have to

allow it by using tags u shown above.

 

Link to comment
Share on other sites

Your apache configuration should allow .htaccess override.

i.e.

AccessFileName .htaccess
<Directory "/var/www/html">
AllowOverride All
</Directory>

This is information that has to be set in the httpd.conf file to enable you to achieve different things with a .htaccess file. The chances are if you don't have a dedicated server you cannot change these values, so unless your host has them enabled anyway you are out of luck. It seems that you are attempting to do it locally, if that is the 'end game' then you can change the httpd.conf file yourself. It's located in the conf folder of your apache directory. Assuming you installed XAMPP, WAMP, LAMP, MAMP or some such package though, they normally have that sort of thing set-up for you already.

 

NB: I quoted Neil because he posted the code, I know your aware where that information goes Neil, I was pointing out for the sake of the OP who seemed to misunderstand you.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.