Afsar
Afsar

Reputation: 1

Hide directory in source code

Actually my question is How is folder path hidden ? Firstly I am using Joomla.

I found a website 4 months ago, so i don't remember name of the website which is Joomla site. They hide their folder path.

Between to head> sth. head(tags). If you look at source code, you can see this part. And then this part include template name. For example:

<link type="text/css" href="http://www.site.com/templates/template_name/css/style.css" rel="stylesheet"></link>

So we can learn to what the name of the template. But they hide this part. When i looked this part(http://www.site.com/templates/template_name/css), i can see only /style.css.

Do you have any idea?

Upvotes: 0

Views: 2544

Answers (2)

nibra
nibra

Reputation: 4028

You need two things to accomplish that.

  1. A (system) plugin, that changes every template related URL to the 'official' format, eg.

    $url = str_replace('/templates/template_name/css/', '/style/', $url;
    
  2. An .htaccess redirect reverting the change.

    RewriteRule ^style/(.*)$ templates/template_name/css/$1 [R=301,L]
    

Upvotes: 1

Emerson Rocha
Emerson Rocha

Reputation: 558

If you want obscure template names, and a few modules and plugins from HTML source, the easy way is use a CSS and JS compressor like jbetolo or RokBooster.

But keep in mind that you will make a bit more hader to find your template name, but still possible via other ways. Like some images if they are not compressed in HTML.

Upvotes: 0

Related Questions