Kādēļ man nestrādā šis https://coding.lv/read/pretty-url-s-uzstadisana-ar-htaccess ?
man ir šitā localhost/news?id=35
bet vajdzētu šitā pārtaisīt. localhost/news/35
Fukzzs miniblogs
- 0
Fukzzs 27.01.2013. 17:07
- 0
Mans htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/?$ /news?id=$2un šis iekš news.php faila.
<?php
$page = $_GET['id'];
if ($page == 'news') {
}
?> - 0
Module rewrite already enabled
<VirtualHost *:80>
ServerName http://fukzzs.info.tm
DocumentRoot /var/www/fukzzs
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/fukzzs>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Ielogojies vai izveido profilu, lai komentētu!