Jump to content

[SOLVED] mod_rewrite on Apache with .htaccess


avvllvva

Recommended Posts

Hi,

The url rewriting is not functioning with my server, I need to change "current url" to "required url" as shown below

Current url : http://www.mydomain.com/seo/scripts/scriptname.php?article_id=45&article_name=noop

Required url : http://www.mydomain.com/seo/scripts/scriptname-article_id-45-article_name-noop.html

 

.htaccess file content

Options +FollowSymLinks

RewriteEngine on

RewriteRule scriptname-article_id-(.*)-article_name-(.*)\.html$

scriptname.php?article_id=$1&article_name=$2

 

Server details

Linux hosting

mod_rewrite module is loaded

 

These are the details and I have also tested the .htaccess file is functioning well with some other codes in the server.

So, anybody can help me, where is the problem ??????

 

Thanks

 

 

 

 

 

Link to comment
Share on other sites

Its get solved.......I have tried some other urls, and now they are working perfect including the line 'Options +FollowSymLinks'

 

.htaccess

Options +FollowSymLinks

RewriteEngine on

RewriteRule ^product/([^/\.]+)/?$ product.php?id=$1 [L]

RewriteRule ^localnews/ localnews.php

 

thanx

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.