.htaccess - Block site address in htaccess -


i had joomla site standard addresses. next change simple addresses. , have problem google robots. had block 2 addresses: index.php?option=com_content&view=frontpage index.php?option=com_content&view=article&id=59&itemid=65

how can this?

the way achieve this, rather using .htaccess, configure "blocking lists" in apache configuration specify lists want use on various web sites. divided lists 3 directories called "countries", "hackers", , "robots", choose wanted block on per-site basis. here sample of 1 of files looks like, phoney ip addresses inserted:

$ cat /etc/apache2/block-lists/hackers/na # north american hack attempts  deny 12.34.56.789 deny 98.76.54.321 [etc...] 

then inside apache configuration file can use these lists inside directory blocks this:

<directory "/var/www/ixo.ca/htdocs/main/restricted">   order deny,allow   include /etc/apache2/block-lists/countries/cn   include /etc/apache2/block-lists/hackers/   include /etc/apache2/block-lists/robots/   </directory> 

this can placed within virtualhost block or outside of 1 (e.g., in case have directory applies more 1 site). if list directory (those above ending slash), files in directory included.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -