WebSite X5Help Center

 
Marcin B.
Marcin B.
User

How To Hide Url Extension?  en

Автор: Marcin B.
Просмотрено 3011, Подписчики 3, Размещенный 34  
Тэги: extension,hide

Is there any chance to hide url extension using website x5? All my pages have .html extension I will appriciate any respond

Размещено
5 Ответы
Der Zwoemti
Der Zwoemti
Moderator

.htacces Inhalt 

RewriteEngine On

# Replace ".php" by ".html"
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} ^(.*)\.html$
RewriteCond %1\.php -f
RewriteCond %{REQUEST_URI} ^(.*)\.html$
RewriteRule ^(.*)$ %1.php [L]

# Replace ".php" by ""
#
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]

# External redirect for files requested as a directory (remove trailing slash)
#
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.*)/$
RewriteCond %1 -U
RewriteRule ^(.*)$ %1 [L,R] 

Читать больше
Размещено От Der Zwoemti
Marcin B.
Marcin B.
User
Автор

:) can you explain what should I do with that code please? Where should I locate it? Thanks in advance Regards

Читать больше
Размещено От Marcin B.
Der Zwoemti
Der Zwoemti
Moderator

.htaccess und google sind dein Freund...ist nicht mein Sprachbereich wo ich geschrieben habe...

Читать больше
Размещено От Der Zwoemti
Marcin B.
Marcin B.
User
Автор

Thanks, i was trying on google and i found that what you have send me. I want to know if that is possible to do through website x5 or I have to locate that code somewhere.

Читать больше
Размещено От Marcin B.
Marcin B.
Marcin B.
User
Автор

anybody can help with that issue??

Читать больше
Размещено От Marcin B.