Hi all, can i ask for your help? I'm in trouble in setting up my vhost in apache. Currently my site is up and running, my problem is that I can't get it to short url. Here's the scenario:
a. I have a website running on my server currently on vhost on port 80 and 443. Here is the config file:
Code:
<VirtualHost *:80>
ServerName wiki.company.com
ServerAdmin infra@company.com
ServerAlias wiki wiki.company.com
DocumentRoot /var/www/html
Redirect / https://wiki.company.com/
</VirtualHost>
<VirtualHost *:443>
ServerName wiki.company.com
ServerAdmin infra@company.com
ProxyPreserveHost On
ProxyRequests Off
SSLProxyEngine off
SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/pki/tls/certs/server.crt
SSLCertificateKeyFile /etc/pki/tls/certs/server.key
DocumentRoot /var/www/html
RedirectMatch ^/$ /wiki/
##################################
RewriteEngine On
RewriteRule ^/?view(/.*)?$ %{DOCUMENT_ROOT}/wiki/index.php [L]
RewriteRule ^/?$ %{DOCUMENT_ROOT}/wiki/index.php [L]
##################################
<Directory /var/www/html/wiki>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
b. Whenever i am going to visit the login page which is
https://wiki.company.com/view/Special:UserLogin. I want to rewrite it's URL to display only
https://wiki.company.com/login or just
https://wiki.company.com/. But my RewriteRule fails. This is what i have added to :*443
Code:
RewriteRule ^/view/Special:UserLogin(.*) https://wiki.company.com/ [R,L]
Hope i explain myself clearly on this. Thanks